summary refs log tree commit diff
path: root/time/tzset.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-10-17 20:24:59 +0000
committerJakub Jelinek <jakub@redhat.com>2007-10-17 20:24:59 +0000
commite2ff293ba10d38af29b08307d6bf90d11143596f (patch)
tree4f57da23acb1a50b8fcc4940d173195fd44d21d3 /time/tzset.c
parent378e8bab9688c447e7567b5066ef26482a4fd8f1 (diff)
downloadglibc-e2ff293ba10d38af29b08307d6bf90d11143596f.tar.gz
glibc-e2ff293ba10d38af29b08307d6bf90d11143596f.tar.xz
glibc-e2ff293ba10d38af29b08307d6bf90d11143596f.zip
Updated to fedora-glibc-20071017T2007
Diffstat (limited to 'time/tzset.c')
-rw-r--r--time/tzset.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/time/tzset.c b/time/tzset.c
index 27efef0f7a..0d54202185 100644
--- a/time/tzset.c
+++ b/time/tzset.c
@@ -401,7 +401,7 @@ tzset_internal (always, explicit)
   if (tz && *tz == ':')
     ++tz;
 
-  /* Check whether the value changes since the last run.  */
+  /* Check whether the value changed since the last run.  */
   if (old_tz != NULL && tz != NULL && strcmp (tz, old_tz) == 0)
     /* No change, simply return.  */
     return;
@@ -606,9 +606,8 @@ __tz_convert (const time_t *timer, int use_localtime, struct tm *tp)
 
   /* Update internal database according to current TZ setting.
      POSIX.1 8.3.7.2 says that localtime_r is not required to set tzname.
-     This is a good idea since this allows at least a bit more parallelism.
-     By analogy we apply the same rule to gmtime_r.  */
-  tzset_internal (tp == &_tmbuf, 0);
+     This is a good idea since this allows at least a bit more parallelism.  */
+  tzset_internal (tp == &_tmbuf && use_localtime, 1);
 
   if (__use_tzfile)
     __tzfile_compute (*timer, use_localtime, &leap_correction,