diff options
Diffstat (limited to 'src/lib9')
-rw-r--r-- | src/lib9/date.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib9/date.c b/src/lib9/date.c index 87cbf694..76f4a262 100644 --- a/src/lib9/date.c +++ b/src/lib9/date.c @@ -44,7 +44,11 @@ tm2Tm(struct tm *tm, Tm *bigtm, int gmt) static void Tm2tm(Tm *bigtm, struct tm *tm) { - memset(tm, 0, sizeof *tm); + /* initialize with current time to get local time zone! (tm_isdst) */ + time_t t; + time(&t); + *tm = *localtime(&t); + tm->tm_sec = bigtm->sec; tm->tm_min = bigtm->min; tm->tm_hour = bigtm->hour; |