From 382fa90fe1fdd0f363088a28a5be12a4548099b4 Mon Sep 17 00:00:00 2001 From: Craig Howland Date: Tue, 31 Mar 2015 10:26:49 +0200 Subject: Move tzset calls to time functions. * libc/stdlib/setenv_r.c (_setenv_r): Remove tzset() call for TZ definition. * libc/time/lcltime_r.c (localtime_r): Add tzset() call * libc/time/mktime.c (mktime): Ditto. * libc/time/strftime.c (strftime, wcsftime): Ditto. Signed-off-by: Corinna Vinschen --- newlib/libc/time/strftime.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'newlib/libc/time/strftime.c') 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. */ -- cgit v1.2.3