From 190bbb992344e350925bb9ebc37775ba8cc4c19f Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 24 Aug 2013 13:11:18 -0400 Subject: properly fill in tzname[] for old (pre-64-bit-format) zoneinfo files in this case, the first standard-time and first daylight-time rules should be taken as the "default" ones to expose. --- src/time/__tz.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/time/__tz.c b/src/time/__tz.c index 8a1836e7..81676d3b 100644 --- a/src/time/__tz.c +++ b/src/time/__tz.c @@ -190,7 +190,28 @@ static void do_tzset() for (s = (const char *)zi+map_size-2; *s!='\n'; s--); s++; } else { - s = 0; + const unsigned char *p; + __tzname[0] = __tzname[1] = 0; + __daylight = __timezone = dst_off = 0; + for (i=0; i<5; i++) r0[i] = r1[i] = 0; + for (p=types; p