summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-08-16 19:51:08 +0000
committerUlrich Drepper <drepper@redhat.com>1997-08-16 19:51:08 +0000
commitb6808c631a4683477e691b24dc01390f68f5ccf8 (patch)
tree640d5653dfecaccec8d693a388b177650d73ca1a
parent1552fb26cc38b8b9212dad30d60b193eb4fbf2a2 (diff)
Interpret no DST information in user provided time zone specification
as it is meant: no DST.
-rw-r--r--time/tzset.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/time/tzset.c b/time/tzset.c
index ca05fa81c5..42b006e0c1 100644
--- a/time/tzset.c
+++ b/time/tzset.c
@@ -304,6 +304,18 @@ __tzset_internal (always)
if (l < 2 && *tz == ':')
++tz;
}
+ if (*tz == '\0' || (tz[0] == ',' && tz[1] == '\0'))
+ {
+ /* There is no rule. See if there is a default rule file. */
+ __tzfile_default (tz_rules[0].name, tz_rules[1].name,
+ tz_rules[0].offset, tz_rules[1].offset);
+ if (__use_tzfile)
+ {
+ free (old_tz);
+ old_tz = NULL;
+ return;
+ }
+ }
}
else
/* There is no DST. */
@@ -312,19 +324,6 @@ __tzset_internal (always)
done_names:
free (tzbuf);
- if (*tz == '\0' || (tz[0] == ',' && tz[1] == '\0'))
- {
- /* There is no rule. See if there is a default rule file. */
- __tzfile_default (tz_rules[0].name, tz_rules[1].name,
- tz_rules[0].offset, tz_rules[1].offset);
- if (__use_tzfile)
- {
- free (old_tz);
- old_tz = NULL;
- return;
- }
- }
-
/* Figure out the standard <-> DST rules. */
for (whichrule = 0; whichrule < 2; ++whichrule)
{