diff options
Diffstat (limited to 'newlib/libc/time')
-rw-r--r-- | newlib/libc/time/lcltime_r.c | 1 | ||||
-rw-r--r-- | newlib/libc/time/mktime.c | 2 | ||||
-rw-r--r-- | newlib/libc/time/strftime.c | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/newlib/libc/time/lcltime_r.c b/newlib/libc/time/lcltime_r.c index 9094e5d3a..8a69e40ee 100644 --- a/newlib/libc/time/lcltime_r.c +++ b/newlib/libc/time/lcltime_r.c @@ -31,6 +31,7 @@ _DEFUN (localtime_r, (tim_p, res), year = res->tm_year + YEAR_BASE; ip = __month_lengths[isleap(year)]; + tzset (); TZ_LOCK; if (_daylight) { diff --git a/newlib/libc/time/mktime.c b/newlib/libc/time/mktime.c index 5bedf5afc..8669fbdfb 100644 --- a/newlib/libc/time/mktime.c +++ b/newlib/libc/time/mktime.c @@ -197,6 +197,8 @@ _DEFUN(mktime, (tim_p), /* compute total seconds */ tim += (days * _SEC_IN_DAY); + tzset (); + TZ_LOCK; if (_daylight) diff --git a/newlib/libc/time/strftime.c b/newlib/libc/time/strftime.c index ee604c2e4..72f06d32e 100644 --- a/newlib/libc/time/strftime.c +++ b/newlib/libc/time/strftime.c @@ -1283,6 +1283,7 @@ recurse: if (tim_p->tm_isdst >= 0) { long offset; + tzset (); #if defined (__CYGWIN__) /* Cygwin must check if the application has been built with or @@ -1313,6 +1314,7 @@ recurse: size_t size; const char *tznam = NULL; + tzset (); TZ_LOCK; #if defined (__CYGWIN__) /* See above. */ |