__time_to_tm: initialize tm_zone and tm_gmtoff
[musl] / src / time / localtime_r.c
1 #include <time.h>
2
3 #include "__time.h"
4
5 struct tm *localtime_r(const time_t *restrict t, struct tm *restrict result)
6 {
7         __tzset();
8         __time_to_tm(*t - __timezone, result);
9         result->tm_isdst = -1;
10         return __dst_adjust(result);
11 }