From: Ulrich Drepper Date: Sat, 16 Aug 1997 19:51:08 +0000 (+0000) Subject: Interpret no DST information in user provided time zone specification X-Git-Tag: cvs/libc-ud-970816~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6808c631a4683477e691b24dc01390f68f5ccf8;p=thirdparty%2Fglibc.git Interpret no DST information in user provided time zone specification as it is meant: no DST. --- diff --git a/time/tzset.c b/time/tzset.c index ca05fa81c57..42b006e0c17 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) {