diff options
Diffstat (limited to 'src/time/localtime_r.c')
-rw-r--r-- | src/time/localtime_r.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/time/localtime_r.c b/src/time/localtime_r.c new file mode 100644 index 00000000..2bf10378 --- /dev/null +++ b/src/time/localtime_r.c @@ -0,0 +1,11 @@ +#include <time.h> + +#include "__time.h" + +struct tm *localtime_r(const time_t *t, struct tm *result) +{ + __tzset(); + __time_to_tm(*t - __timezone, result); + result->tm_isdst = -1; + return __dst_adjust(result); +} |