aboutsummaryrefslogtreecommitdiff
path: root/time/tzset.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-08-09 07:24:19 +0000
committerUlrich Drepper <drepper@redhat.com>2004-08-09 07:24:19 +0000
commitfe6cc2ae0947c91d9daf844dccc44a8c76deb767 (patch)
tree036330f5f78f9cd95101bc3926dc8991b1d689f4 /time/tzset.c
parentc14e91352e26aa4e1622f08bb9a25a9527a8db2b (diff)
downloadglibc-fe6cc2ae0947c91d9daf844dccc44a8c76deb767.tar
glibc-fe6cc2ae0947c91d9daf844dccc44a8c76deb767.tar.gz
glibc-fe6cc2ae0947c91d9daf844dccc44a8c76deb767.tar.bz2
glibc-fe6cc2ae0947c91d9daf844dccc44a8c76deb767.zip
[BZ #154]
Update. 2004-08-09 Ulrich Drepper <drepper@redhat.com> * time/tzset.c (tzset_internal): If TZ is not set do not compare old and new tz value since it might be /etc/localtime in both cases although the file changed. [BZ #154] Patch by Christian Franke <franke@computer.org>. * time/tzfile.c (__tzfile_read): Determine dev/ino of file. Compare with values of previously opened file. Don't do anything is they match.
Diffstat (limited to 'time/tzset.c')
-rw-r--r--time/tzset.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/time/tzset.c b/time/tzset.c
index 2274a38f59..aa866918e5 100644
--- a/time/tzset.c
+++ b/time/tzset.c
@@ -159,10 +159,7 @@ tzset_internal (always)
/* Examine the TZ environment variable. */
tz = getenv ("TZ");
- if (tz == NULL)
- /* No user specification; use the site-wide default. */
- tz = TZDEFAULT;
- else if (*tz == '\0')
+ if (tz && *tz == '\0')
/* User specified the empty string; use UTC explicitly. */
tz = "Universal";
@@ -177,6 +174,10 @@ tzset_internal (always)
/* No change, simply return. */
return;
+ if (tz == NULL)
+ /* No user specification; use the site-wide default. */
+ tz = TZDEFAULT;
+
tz_rules[0].name = NULL;
tz_rules[1].name = NULL;