diff options
author | Stuart Bishop <stuart@stuartbishop.net> | 2015-10-26 12:28:13 +0700 |
---|---|---|
committer | Stuart Bishop <stuart@stuartbishop.net> | 2015-10-26 12:28:13 +0700 |
commit | 17fd77664afec0d2c803a950fbcb7584e06b3c7d (patch) | |
tree | ceb2dad58b70dc543223b3e90e95d5041089f6e1 | |
parent | d53e863459e1a61075af44209e3581636682a162 (diff) | |
download | pytz-17fd77664afec0d2c803a950fbcb7584e06b3c7d.tar.gz |
Import 2015g
-rw-r--r-- | elsie.nci.nih.gov/src/Makefile | 2 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/NEWS | 42 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/asia | 14 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/australasia | 34 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/checklinks.awk | 39 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/europe | 7 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/localtime.c | 82 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/northamerica | 22 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/private.h | 13 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/strftime.c | 7 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/tz-art.htm | 5 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/tz-link.htm | 4 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/tzfile.5 | 9 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/tzfile.5.txt | 16 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/zic.c | 19 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/zone.tab | 1 | ||||
-rw-r--r-- | elsie.nci.nih.gov/src/zone1970.tab | 1 |
17 files changed, 237 insertions, 80 deletions
diff --git a/elsie.nci.nih.gov/src/Makefile b/elsie.nci.nih.gov/src/Makefile index d2f64c8..cebe399 100644 --- a/elsie.nci.nih.gov/src/Makefile +++ b/elsie.nci.nih.gov/src/Makefile @@ -5,7 +5,7 @@ PACKAGE= tzcode # Version numbers of the code and data distributions. -VERSION= 2015f +VERSION= 2015g # Email address for bug reports. BUGEMAIL= tz@iana.org diff --git a/elsie.nci.nih.gov/src/NEWS b/elsie.nci.nih.gov/src/NEWS index b477250..00d07cb 100644 --- a/elsie.nci.nih.gov/src/NEWS +++ b/elsie.nci.nih.gov/src/NEWS @@ -1,5 +1,47 @@ News for the tz database +Release 2015g - 2015-10-01 00:39:51 -0700 + + Changes affecting future time stamps + + Turkey's 2015 fall-back transition is scheduled for Nov. 8, not Oct. 25. + (Thanks to Fatih.) + + Norfolk moves from +1130 to +1100 on 2015-10-04 at 02:00 local time. + (Thanks to Alexander Krivenyshev.) + + Fiji's 2016 fall-back transition is scheduled for January 17, not 24. + (Thanks to Ken Rylander.) + + Fort Nelson, British Columbia will not fall back on 2015-11-01. It has + effectively been on MST (-0700) since it advanced its clocks on 2015-03-08. + New zone America/Fort_Nelson. (Thanks to Matt Johnson.) + + Changes affecting past time stamps + + Norfolk observed DST from 1974-10-27 02:00 to 1975-03-02 02:00. + + Changes affecting code + + localtime no longer mishandles America/Anchorage after 2037. + (Thanks to Bradley White for reporting the bug.) + + The localtime module allows the variables 'timezone', 'daylight', + and 'altzone' to be in common storage shared with other modules, + and declares them in case the system <time.h> does not. + (Problems reported by Kees Dekker.) + + On platforms with tm_zone, strftime.c now assumes it is not NULL. + This simplifies the code and is consistent with zdump.c. + (Problem reported by Christos Zoulas.) + + Changes affecting documentation + + The tzfile man page now documents that transition times denote the + starts (not the ends) of the corresponding time periods. + (Ambiguity reported by Bill Seymour.) + + Release 2015f - 2015-08-10 18:06:56 -0700 Changes affecting future time stamps diff --git a/elsie.nci.nih.gov/src/asia b/elsie.nci.nih.gov/src/asia index 4f8756b..5467024 100644 --- a/elsie.nci.nih.gov/src/asia +++ b/elsie.nci.nih.gov/src/asia @@ -131,7 +131,8 @@ Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2 # Azerbaijan # From Rustam Aliyev of the Azerbaijan Internet Forum (2005-10-23): # According to the resolution of Cabinet of Ministers, 1997 -# Resolution available at: http://aif.az/docs/daylight_res.pdf +# From Paul Eggert (2015-09-17): It was Resolution No. 21 (1997-03-17). +# http://code.az/files/daylight_res.pdf # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Azer 1997 max - Mar lastSun 4:00 1:00 S Rule Azer 1997 max - Oct lastSun 5:00 0 - @@ -1717,11 +1718,12 @@ Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S # the 8:30 time zone on August 15, one example: # http://www.bbc.com/news/world-asia-33815049 # -# From Paul Eggert (2015-08-07): -# No transition time is specified; assume 00:00. +# From Paul Eggert (2015-08-15): +# Bells rang out midnight (00:00) Friday as part of the celebrations. See: +# Talmadge E. North Korea celebrates new time zone, 'Pyongyang Time' +# http://news.yahoo.com/north-korea-celebrates-time-zone-pyongyang-time-164038128.html # There is no common English-language abbreviation for this time zone. -# Use %z rather than invent one. We can't assume %z works everywhere yet, -# so for now substitute its output manually. +# Use KST, as that's what we already use for 1954-1961 in ROK. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1 @@ -1735,7 +1737,7 @@ Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1 8:30 - KST 1912 Jan 1 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Aug 24 - 9:00 - KST 2015 Aug 15 + 9:00 - KST 2015 Aug 15 00:00 8:30 - KST ############################################################################### diff --git a/elsie.nci.nih.gov/src/australasia b/elsie.nci.nih.gov/src/australasia index 3e2c0b3..5c272db 100644 --- a/elsie.nci.nih.gov/src/australasia +++ b/elsie.nci.nih.gov/src/australasia @@ -335,10 +335,17 @@ Zone Indian/Cocos 6:27:40 - LMT 1900 # DST will start Nov. 2 this year. # http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-NOVEMBER-2ND.aspx -# From Paul Eggert (2014-10-20): +# From a government order dated 2015-08-26 and published as Legal Notice No. 77 +# in the Government of Fiji Gazette Supplement No. 24 (2015-08-28), +# via Ken Rylander (2015-09-02): +# the daylight saving period is 1 hour in advance of the standard time +# commencing at 2.00 am on Sunday 1st November, 2015 and ending at +# 3.00 am on Sunday 17th January, 2016. + +# From Paul Eggert (2015-09-01): # For now, guess DST from 02:00 the first Sunday in November to -# 03:00 the first Sunday on or after January 18. Although ad hoc, it -# matches this year's plan and seems more likely to match future +# 03:00 the third Sunday in January. Although ad hoc, it matches +# transitions since late 2014 and seems more likely to match future # practice than guessing no DST. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -351,7 +358,7 @@ Rule Fiji 2011 only - Mar Sun>=1 3:00 0 - Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 - Rule Fiji 2014 only - Jan Sun>=18 2:00 0 - Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 S -Rule Fiji 2015 max - Jan Sun>=18 3:00 0 - +Rule Fiji 2015 max - Jan Sun>=15 3:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva 12:00 Fiji FJ%sT # Fiji Time @@ -510,7 +517,10 @@ Zone Pacific/Niue -11:19:40 - LMT 1901 # Alofi # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Norfolk 11:11:52 - LMT 1901 # Kingston 11:12 - NMT 1951 # Norfolk Mean Time - 11:30 - NFT # Norfolk Time + 11:30 - NFT 1974 Oct 27 02:00 # Norfolk T. + 11:30 1:00 NFST 1975 Mar 2 02:00 + 11:30 - NFT 2015 Oct 4 02:00 + 11:00 - NFT # Palau (Belau) # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1550,6 +1560,20 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # started DST on June 3. Possibly DST was observed other years # in Midway, but we have no record of it. +# Norfolk + +# From Alexander Krivenyshev (2015-09-23): +# Norfolk Island will change ... from +1130 to +1100: +# https://www.comlaw.gov.au/Details/F2015L01483/Explanatory%20Statement/Text +# ... at 12.30 am (by legal time in New South Wales) on 4 October 2015. +# http://www.norfolkisland.gov.nf/nia/MediaRelease/Media%20Release%20Norfolk%20Island%20Standard%20Time%20Change.pdf + +# From Paul Eggert (2015-09-23): +# Transitions before 2015 are from timeanddate.com, which consulted +# the Norfolk Island Museum and the Australian Bureau of Meteorology's +# Norfolk Island station, and found no record of Norfolk observing DST +# other than in 1974/5. See: +# http://www.timeanddate.com/time/australia/norfolk-island.html # Pitcairn diff --git a/elsie.nci.nih.gov/src/checklinks.awk b/elsie.nci.nih.gov/src/checklinks.awk index f57f736..f0ff726 100644 --- a/elsie.nci.nih.gov/src/checklinks.awk +++ b/elsie.nci.nih.gov/src/checklinks.awk @@ -2,14 +2,43 @@ # Contributed by Paul Eggert. -/^Link/ { used[$2] = 1 } -/^Zone/ { defined[$2] = 1 } +BEGIN { + # Special marker indicating that the name is defined as a Zone. + # It is a newline so that it cannot match a valid name. + # It is not null so that its slot does not appear unset. + Zone = "\n" +} -END { - status = 0 +/^Zone/ { + if (defined[$2]) { + if (defined[$2] == Zone) { + printf "%s: Zone has duplicate definition\n", $2 + } else { + printf "%s: Link with same name as Zone\n", $2 + } + status = 1 + } + defined[$2] = Zone +} +/^Link/ { + if (defined[$3]) { + if (defined[$3] == Zone) { + printf "%s: Link with same name as Zone\n", $3 + } else if (defined[$3] == $2) { + printf "%s: Link has duplicate definition\n", $3 + } else { + printf "%s: Link to both %s and %s\n", $3, defined[$3], $2 + } + status = 1 + } + used[$2] = 1 + defined[$3] = $2 +} + +END { for (tz in used) { - if (!defined[tz]) { + if (defined[tz] != Zone) { printf "%s: Link to non-zone\n", tz status = 1 } diff --git a/elsie.nci.nih.gov/src/europe b/elsie.nci.nih.gov/src/europe index 6b89b6e..358a048 100644 --- a/elsie.nci.nih.gov/src/europe +++ b/elsie.nci.nih.gov/src/europe @@ -3150,6 +3150,11 @@ Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment. # http://www.balkaneu.com/eventful-elections-turkey/ 2014-03-30. # I guess the best we can do is document the official time. +# From Fatih (2015-09-29): +# It's officially announced now by the Ministry of Energy. +# Turkey delays winter time to 8th of November 04:00 +# http://www.aa.com.tr/tr/turkiye/yaz-saati-uygulamasi-8-kasimda-sona-erecek/362217 + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Turkey 1916 only - May 1 0:00 1:00 S Rule Turkey 1916 only - Oct 1 0:00 0 - @@ -3219,6 +3224,8 @@ Zone Europe/Istanbul 1:55:52 - LMT 1880 2:00 - EET 2011 Mar 28 1:00u 2:00 EU EE%sT 2014 Mar 30 1:00u 2:00 - EET 2014 Mar 31 1:00u + 2:00 EU EE%sT 2015 Oct 25 1:00u + 2:00 1:00 EEST 2015 Nov 8 1:00u 2:00 EU EE%sT Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents. diff --git a/elsie.nci.nih.gov/src/localtime.c b/elsie.nci.nih.gov/src/localtime.c index ded8f7b..e3bc763 100644 --- a/elsie.nci.nih.gov/src/localtime.c +++ b/elsie.nci.nih.gov/src/localtime.c @@ -194,12 +194,12 @@ char * tzname[2] = { static struct tm tm; #ifdef USG_COMPAT -long timezone = 0; -int daylight = 0; +long timezone; +int daylight; #endif /* defined USG_COMPAT */ #ifdef ALTZONE -long altzone = 0; +long altzone; #endif /* defined ALTZONE */ /* Initialize *S to a value based on GMTOFF, ISDST, and ABBRIND. */ @@ -556,11 +556,6 @@ tzloadbody(char const *name, struct state *sp, bool doextend, break; nread -= p - up->buf; memmove(up->buf, p, nread); - /* - ** If this is a signed narrow time_t system, we're done. - */ - if (TYPE_SIGNED(time_t) && stored >= (int) sizeof(time_t)) - break; } if (doextend && nread > 2 && up->buf[0] == '\n' && up->buf[nread - 1] == '\n' && @@ -569,31 +564,52 @@ tzloadbody(char const *name, struct state *sp, bool doextend, up->buf[nread - 1] = '\0'; if (tzparse(&up->buf[1], ts, false) - && ts->typecnt == 2 - && sp->charcnt + ts->charcnt <= TZ_MAX_CHARS) { - for (i = 0; i < 2; ++i) - ts->ttis[i].tt_abbrind += - sp->charcnt; - for (i = 0; i < ts->charcnt; ++i) - sp->chars[sp->charcnt++] = - ts->chars[i]; - i = 0; - while (i < ts->timecnt && - ts->ats[i] <= - sp->ats[sp->timecnt - 1]) - ++i; - while (i < ts->timecnt && - sp->timecnt < TZ_MAX_TIMES) { - sp->ats[sp->timecnt] = - ts->ats[i]; - sp->types[sp->timecnt] = - sp->typecnt + - ts->types[i]; - ++sp->timecnt; - ++i; - } - sp->ttis[sp->typecnt++] = ts->ttis[0]; - sp->ttis[sp->typecnt++] = ts->ttis[1]; + && ts->typecnt == 2) { + + /* Attempt to reuse existing abbreviations. + Without this, America/Anchorage would stop + working after 2037 when TZ_MAX_CHARS is 50, as + sp->charcnt equals 42 (for LMT CAT CAWT CAPT AHST + AHDT YST AKDT AKST) and ts->charcnt equals 10 + (for AKST AKDT). Reusing means sp->charcnt can + stay 42 in this example. */ + int gotabbr = 0; + int charcnt = sp->charcnt; + for (i = 0; i < 2; i++) { + char *tsabbr = ts->chars + ts->ttis[i].tt_abbrind; + int j; + for (j = 0; j < charcnt; j++) + if (strcmp(sp->chars + j, tsabbr) == 0) { + ts->ttis[i].tt_abbrind = j; + gotabbr++; + break; + } + if (! (j < charcnt)) { + int tsabbrlen = strlen(tsabbr); + if (j + tsabbrlen < TZ_MAX_CHARS) { + strcpy(sp->chars + j, tsabbr); + charcnt = j + tsabbrlen + 1; + ts->ttis[i].tt_abbrind = j; + gotabbr++; + } + } + } + if (gotabbr == 2) { + sp->charcnt = charcnt; + for (i = 0; i < ts->timecnt; i++) + if (sp->ats[sp->timecnt - 1] < ts->ats[i]) + break; + while (i < ts->timecnt + && sp->timecnt < TZ_MAX_TIMES) { + sp->ats[sp->timecnt] = ts->ats[i]; + sp->types[sp->timecnt] = (sp->typecnt + + ts->types[i]); + sp->timecnt++; + i++; + } + sp->ttis[sp->typecnt++] = ts->ttis[0]; + sp->ttis[sp->typecnt++] = ts->ttis[1]; + } } } if (sp->timecnt > 1) { diff --git a/elsie.nci.nih.gov/src/northamerica b/elsie.nci.nih.gov/src/northamerica index 660a920..7658a45 100644 --- a/elsie.nci.nih.gov/src/northamerica +++ b/elsie.nci.nih.gov/src/northamerica @@ -1826,6 +1826,22 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep # The transition dates (and times) are guesses. +# From Matt Johnson (2015-09-21): +# Fort Nelson, BC, Canada will cancel DST this year. So while previously they +# were aligned with America/Vancouver, they're now aligned with +# America/Dawson_Creek. +# http://www.northernrockies.ca/EN/meta/news/archives/2015/northern-rockies-time-change.html +# +# From Tim Parenti (2015-09-23): +# This requires a new zone for the Northern Rockies Regional Municipality, +# America/Fort_Nelson. The resolution of 2014-12-08 was reached following a +# 2014-11-15 poll with nearly 75% support. Effectively, the municipality has +# been on MST (-0700) like Dawson Creek since it advanced its clocks on +# 2015-03-08. +# +# From Paul Eggert (2015-09-23): +# Shanks says Fort Nelson did not observe DST in 1946, unlike Vancouver. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Vanc 1918 only - Apr 14 2:00 1:00 D Rule Vanc 1918 only - Oct 27 2:00 0 S @@ -1844,6 +1860,12 @@ Zone America/Dawson_Creek -8:00:56 - LMT 1884 -8:00 Canada P%sT 1947 -8:00 Vanc P%sT 1972 Aug 30 2:00 -7:00 - MST +Zone America/Fort_Nelson -8:10:47 - LMT 1884 + -8:00 Vanc P%sT 1946 + -8:00 - PST 1947 + -8:00 Vanc P%sT 1987 + -8:00 Canada P%sT 2015 Mar 8 2:00 + -7:00 - MST Zone America/Creston -7:46:04 - LMT 1884 -7:00 - MST 1916 Oct 1 -8:00 - PST 1918 Jun 2 diff --git a/elsie.nci.nih.gov/src/private.h b/elsie.nci.nih.gov/src/private.h index 184da8f..1c176e6 100644 --- a/elsie.nci.nih.gov/src/private.h +++ b/elsie.nci.nih.gov/src/private.h @@ -383,12 +383,25 @@ void tzset(void); ** Some time.h implementations don't declare asctime_r. ** Others might define it as a macro. ** Fix the former without affecting the latter. +** Similarly for timezone, daylight, and altzone. */ #ifndef asctime_r extern char * asctime_r(struct tm const *restrict, char *restrict); #endif +#ifdef USG_COMPAT +# ifndef timezone +extern long timezone; +# endif +# ifndef daylight +extern int daylight; +# endif +#endif +#if defined ALTZONE && !defined altzone +extern long altzone; +#endif + /* ** The STD_INSPIRED functions are similar, but most also need ** declarations if time_tz is defined. diff --git a/elsie.nci.nih.gov/src/strftime.c b/elsie.nci.nih.gov/src/strftime.c index 7c5e516..27af34a 100644 --- a/elsie.nci.nih.gov/src/strftime.c +++ b/elsie.nci.nih.gov/src/strftime.c @@ -473,13 +473,12 @@ label: continue; case 'Z': #ifdef TM_ZONE - if (t->TM_ZONE != NULL) - pt = _add(t->TM_ZONE, pt, ptlim); - else -#endif /* defined TM_ZONE */ + pt = _add(t->TM_ZONE, pt, ptlim); +#else if (t->tm_isdst >= 0) pt = _add(tzname[t->tm_isdst != 0], pt, ptlim); +#endif /* ** C99 says that %Z must be replaced by the ** empty string if the time zone is not diff --git a/elsie.nci.nih.gov/src/tz-art.htm b/elsie.nci.nih.gov/src/tz-art.htm index 63b7c09..9e55fb1 100644 --- a/elsie.nci.nih.gov/src/tz-art.htm +++ b/elsie.nci.nih.gov/src/tz-art.htm @@ -496,6 +496,11 @@ yesterday daylight [saving] time ended. Right now it's basically midnight." (Conan O'Brien on the 2010-11-08 premiere of <em>Conan</em>.) </li> <li> +"Well, in my time zone that's all the time I have, +but maybe in your time zone I haven't finished yet. So stay tuned!" +(Goldie Hawn, <em>Rowan & Martin's Laugh-In</em> No. 65, 1970-03-09) +</li> +<li> Peppermint Patty: "What if the world comes to an end tonight, Marcie?" <br> Marcie: "I promise there'll be a tomorrow, sir ... in fact, diff --git a/elsie.nci.nih.gov/src/tz-link.htm b/elsie.nci.nih.gov/src/tz-link.htm index cc44768..63ec385 100644 --- a/elsie.nci.nih.gov/src/tz-link.htm +++ b/elsie.nci.nih.gov/src/tz-link.htm @@ -8,7 +8,7 @@ <meta http-equiv="Content-type" content='text/html; charset="UTF-8"'> <meta name="DC.Creator" content="Eggert, Paul"> <meta name="DC.Contributor" content="Olson, Arthur David"> -<meta name="DC.Date" content="2015-08-10"> +<meta name="DC.Date" content="2015-10-01"> <meta name="DC.Description" content="Sources of information about time zones and daylight saving time"> <meta name="DC.Identifier" @@ -731,7 +731,7 @@ Schema: Datatypes – dateTime</a> specifies a format inspired by <a href="http://tools.ietf.org/html/rfc5322">Internet Message Format</a> (Internet <abbr>RFC</abbr> 5322) §3.3 specifies the time notation used in email and <a -href="http://www.w3.org/Protocols/"><abbr>HTTP</abbr></a> +href="https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol"><abbr>HTTP</abbr></a> headers.</li> <li> <a href="http://tools.ietf.org/html/rfc3339">Date and Time diff --git a/elsie.nci.nih.gov/src/tzfile.5 b/elsie.nci.nih.gov/src/tzfile.5 index 54a67c6..b7e6d45 100644 --- a/elsie.nci.nih.gov/src/tzfile.5 +++ b/elsie.nci.nih.gov/src/tzfile.5 @@ -1,9 +1,6 @@ .TH TZFILE 5 .SH NAME tzfile \- time zone information -.SH SYNOPSIS -.B -#include <tzfile.h> .SH DESCRIPTION The time zone information files used by .IR tzset (3) @@ -50,7 +47,8 @@ Next come .I tzh_timecnt one-byte unsigned integer values; each one tells which of the different types of local time types -described in the file is associated with the same-indexed transition time. +described in the file is associated with the time period +starting with the same-indexed transition time. These values serve as indices into an array of .I ttinfo structures (with @@ -99,7 +97,8 @@ the first value of each pair gives the time at which a leap second occurs; the second gives the .I total -number of leap seconds to be applied after the given time. +number of leap seconds to be applied during the time period +starting at the given time. The pairs of values are sorted in ascending order by time. .PP Then there are diff --git a/elsie.nci.nih.gov/src/tzfile.5.txt b/elsie.nci.nih.gov/src/tzfile.5.txt index 560a2ce..fbc44e6 100644 --- a/elsie.nci.nih.gov/src/tzfile.5.txt +++ b/elsie.nci.nih.gov/src/tzfile.5.txt @@ -3,9 +3,6 @@ TZFILE(5) File Formats Manual TZFILE(5) NAME tzfile - time zone information -SYNOPSIS - #include <tzfile.h> - DESCRIPTION The time zone information files used by tzset(3) begin with the magic characters "TZif" to identify them as time zone information files, @@ -43,10 +40,10 @@ DESCRIPTION at which the rules for computing local time change. Next come tzh_timecnt one-byte unsigned integer values; each one tells which of the different types of local time types described in the file is - associated with the same-indexed transition time. These values serve - as indices into an array of ttinfo structures (with tzh_typecnt - entries) that appears next in the file; these structures are defined as - follows: + associated with the time period starting with the same-indexed + transition time. These values serve as indices into an array of ttinfo + structures (with tzh_typecnt entries) that appears next in the file; + these structures are defined as follows: struct ttinfo { int32_t tt_gmtoff; @@ -65,8 +62,9 @@ DESCRIPTION Then there are tzh_leapcnt pairs of four-byte values, written in standard byte order; the first value of each pair gives the time (as returned by time(2)) at which a leap second occurs; the second gives - the total number of leap seconds to be applied after the given time. - The pairs of values are sorted in ascending order by time. + the total number of leap seconds to be applied during the time period + starting at the given time. The pairs of values are sorted in + ascending order by time. Then there are tzh_ttisstdcnt standard/wall indicators, each stored as a one-byte value; they tell whether the transition times associated diff --git a/elsie.nci.nih.gov/src/zic.c b/elsie.nci.nih.gov/src/zic.c index 5d5f1cd..78ab870 100644 --- a/elsie.nci.nih.gov/src/zic.c +++ b/elsie.nci.nih.gov/src/zic.c @@ -1937,7 +1937,7 @@ abbroffset(char *buf, zic_t offset) static size_t doabbr(char *abbr, struct zone const *zp, char const *letters, - bool isdst, bool doquotes) + zic_t stdoff, bool doquotes) { register char * cp; register char * slashp; @@ -1948,11 +1948,11 @@ doabbr(char *abbr, struct zone const *zp, char const *letters, if (slashp == NULL) { char letterbuf[PERCENT_Z_LEN_BOUND + 1]; if (zp->z_format_specifier == 'z') - letters = abbroffset(letterbuf, -zp->z_gmtoff); + letters = abbroffset(letterbuf, zp->z_gmtoff + stdoff); else if (!letters) letters = "%s"; sprintf(abbr, format, letters); - } else if (isdst) { + } else if (stdoff != 0) { strcpy(abbr, slashp + 1); } else { memcpy(abbr, format, slashp - format); @@ -2176,7 +2176,7 @@ stringzone(char *result, const struct zone *const zpfirst, const int zonecount) if (stdrp == NULL && (zp->z_nrules != 0 || zp->z_stdoff != 0)) return -1; abbrvar = (stdrp == NULL) ? "" : stdrp->r_abbrvar; - len = doabbr(result, zp, abbrvar, false, true); + len = doabbr(result, zp, abbrvar, 0, true); offsetlen = stringoffset(result + len, -zp->z_gmtoff); if (! offsetlen) { result[0] = '\0'; @@ -2185,7 +2185,7 @@ stringzone(char *result, const struct zone *const zpfirst, const int zonecount) len += offsetlen; if (dstrp == NULL) return compat; - len += doabbr(result + len, zp, dstrp->r_abbrvar, true, true); + len += doabbr(result + len, zp, dstrp->r_abbrvar, dstrp->r_stdoff, true); if (dstrp->r_stdoff != SECSPERMIN * MINSPERHOUR) { offsetlen = stringoffset(result + len, -(zp->z_gmtoff + dstrp->r_stdoff)); @@ -2356,7 +2356,7 @@ outzone(const struct zone *zpfirst, int zonecount) startoff = zp->z_gmtoff; if (zp->z_nrules == 0) { stdoff = zp->z_stdoff; - doabbr(startbuf, zp, NULL, stdoff != 0, false); + doabbr(startbuf, zp, NULL, stdoff, false); type = addtype(oadd(zp->z_gmtoff, stdoff), startbuf, stdoff != 0, startttisstd, startttisgmt); @@ -2450,7 +2450,7 @@ outzone(const struct zone *zpfirst, int zonecount) stdoff); doabbr(startbuf, zp, rp->r_abbrvar, - rp->r_stdoff != 0, + rp->r_stdoff, false); continue; } @@ -2460,15 +2460,14 @@ outzone(const struct zone *zpfirst, int zonecount) doabbr(startbuf, zp, rp->r_abbrvar, - rp->r_stdoff != - false, + rp->r_stdoff, false); } } eats(zp->z_filename, zp->z_linenum, rp->r_filename, rp->r_linenum); doabbr(ab, zp, rp->r_abbrvar, - rp->r_stdoff != 0, false); + rp->r_stdoff, false); offset = oadd(zp->z_gmtoff, rp->r_stdoff); type = addtype(offset, ab, rp->r_stdoff != 0, rp->r_todisstd, rp->r_todisgmt); diff --git a/elsie.nci.nih.gov/src/zone.tab b/elsie.nci.nih.gov/src/zone.tab index 381f245..935143f 100644 --- a/elsie.nci.nih.gov/src/zone.tab +++ b/elsie.nci.nih.gov/src/zone.tab @@ -129,6 +129,7 @@ CA +6227-11421 America/Yellowknife Mountain Time - central Northwest Territories CA +682059-1334300 America/Inuvik Mountain Time - west Northwest Territories CA +4906-11631 America/Creston Mountain Standard Time - Creston, British Columbia CA +5946-12014 America/Dawson_Creek Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia +CA +5848-12242 America/Fort_Nelson Mountain Standard Time - Fort Nelson, British Columbia CA +4916-12307 America/Vancouver Pacific Time - west British Columbia CA +6043-13503 America/Whitehorse Pacific Time - south Yukon CA +6404-13925 America/Dawson Pacific Time - north Yukon diff --git a/elsie.nci.nih.gov/src/zone1970.tab b/elsie.nci.nih.gov/src/zone1970.tab index c9d31d9..1e1b7e7 100644 --- a/elsie.nci.nih.gov/src/zone1970.tab +++ b/elsie.nci.nih.gov/src/zone1970.tab @@ -126,6 +126,7 @@ CA +6227-11421 America/Yellowknife Mountain Time - central Northwest Territories CA +682059-1334300 America/Inuvik Mountain Time - west Northwest Territories CA +4906-11631 America/Creston Mountain Standard Time - Creston, British Columbia CA +5946-12014 America/Dawson_Creek Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia +CA +5848-12242 America/Fort_Nelson Mountain Standard Time - Fort Nelson, British Columbia CA +4916-12307 America/Vancouver Pacific Time - west British Columbia CA +6043-13503 America/Whitehorse Pacific Time - south Yukon CA +6404-13925 America/Dawson Pacific Time - north Yukon |