diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-08-15 10:40:11 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-08-15 10:40:11 -0400 |
commit | b363e1cae190e2f64f28694d5cc63c774c370a36 (patch) | |
tree | 1ed29660d27a85ba3280f21dc4ad513ba4b42943 /src/time/localtime.c | |
parent | b19c5d9433b2ee193e2727a91ff657faf9cfa1cf (diff) |
add call to tzset()
Diffstat (limited to 'src/time/localtime.c')
-rw-r--r-- | src/time/localtime.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/time/localtime.c b/src/time/localtime.c index 72040d00..ddfecab5 100644 --- a/src/time/localtime.c +++ b/src/time/localtime.c @@ -8,6 +8,10 @@ struct tm * localtime(const time_t * timer) static struct tm tm = {0}; ASSERT_NONNULL(timer); + #ifdef _POSIX_SOURCE + tzset(); + #endif + tm = *gmtime(timer); /* TODO: adjust for timezone */ |