projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
new gcc wrapper, entirely specfile based
[musl]
/
src
/
time
/
mktime.c
1
#include <time.h>
2
3
#include "__time.h"
4
5
time_t mktime(struct tm *tm)
6
{
7
int isdst = tm->tm_isdst;
8
time_t t, lt;
9
10
__tzset();
11
12
tm->tm_sec += __timezone;
13
if (isdst > 0) tm->tm_sec += __dst_offset;
14
15
t = __tm_to_time(tm);
16
17
lt = t - __timezone;
18
if (isdst > 0) lt -= __dst_offset;
19
__time_to_tm(lt, tm);
20
21
__dst_adjust(tm);
22
23
return t;
24
}