summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Bishop <stuart@stuartbishop.net>2014-11-03 14:18:46 +0700
committerStuart Bishop <stuart@stuartbishop.net>2014-11-03 14:18:46 +0700
commitb05d29e34d66825b880c63994ff238ef25d8be51 (patch)
treed4bd507f3bed2185d1b8e8781c6594208296dc38
parent880f0956d1eb9b64d64786f4f53fdf0cbf8b00b4 (diff)
downloadpytz-b05d29e34d66825b880c63994ff238ef25d8be51.tar.gz
Import 2014i
-rw-r--r--elsie.nci.nih.gov/src/Makefile20
-rw-r--r--elsie.nci.nih.gov/src/NEWS127
-rw-r--r--elsie.nci.nih.gov/src/Theory4
-rw-r--r--elsie.nci.nih.gov/src/africa57
-rw-r--r--elsie.nci.nih.gov/src/asctime.c4
-rw-r--r--elsie.nci.nih.gov/src/asia82
-rw-r--r--elsie.nci.nih.gov/src/australasia44
-rw-r--r--elsie.nci.nih.gov/src/backzone120
-rw-r--r--elsie.nci.nih.gov/src/checktab.awk12
-rw-r--r--elsie.nci.nih.gov/src/europe15
-rw-r--r--elsie.nci.nih.gov/src/localtime.c389
-rw-r--r--elsie.nci.nih.gov/src/newtzset.35
-rw-r--r--elsie.nci.nih.gov/src/newtzset.3.txt9
-rw-r--r--elsie.nci.nih.gov/src/northamerica41
-rw-r--r--elsie.nci.nih.gov/src/private.h10
-rw-r--r--elsie.nci.nih.gov/src/tz-art.htm12
-rw-r--r--elsie.nci.nih.gov/src/tz-link.htm26
-rw-r--r--elsie.nci.nih.gov/src/zdump.844
-rw-r--r--elsie.nci.nih.gov/src/zdump.8.txt25
-rw-r--r--elsie.nci.nih.gov/src/zdump.c127
-rw-r--r--elsie.nci.nih.gov/src/zic.82
-rw-r--r--elsie.nci.nih.gov/src/zic.8.txt8
-rw-r--r--elsie.nci.nih.gov/src/zone.tab3
-rw-r--r--elsie.nci.nih.gov/src/zone1970.tab8
24 files changed, 842 insertions, 352 deletions
diff --git a/elsie.nci.nih.gov/src/Makefile b/elsie.nci.nih.gov/src/Makefile
index 00611dd..56dc286 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= 2014g
+VERSION= 2014i
# Email address for bug reports.
BUGEMAIL= tz@iana.org
@@ -129,6 +129,7 @@ LDLIBS=
# -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU=1
# if you do not want run time warnings about formats that may cause
# year 2000 grief
+# -Dssize_t=long on ancient hosts that lack ssize_t
# -DTHREAD_SAFE=1 to make localtime.c thread-safe, as POSIX requires;
# not needed by the main-program tz code, which is single-threaded.
# Append other compiler flags as needed, e.g., -pthread on GNU/Linux.
@@ -467,7 +468,8 @@ tzselect: tzselect.ksh
<$? >$@
chmod +x $@
-check: check_character_set check_white_space check_tables check_web
+check: check_character_set check_white_space check_sorted \
+ check_tables check_web
check_character_set: $(ENCHILADA)
LC_ALL=en_US.utf8 && export LC_ALL && \
@@ -486,6 +488,18 @@ check_white_space: $(ENCHILADA)
! grep -n '[[:space:]]$$' $(ENCHILADA)
! grep -n "$$(printf '[\f\r\v]\n')" $(ENCHILADA)
+CHECK_CC_LIST = { n = split($$1,a,/,/); for (i=2; i<=n; i++) print a[1], a[i]; }
+
+check_sorted: backward backzone iso3166.tab zone.tab zone1970.tab
+ $(AWK) '/^Link/ {print $$3}' backward | LC_ALL=C sort -cu
+ $(AWK) '/^Zone/ {print $$2}' backzone | LC_ALL=C sort -cu
+ $(AWK) '/^[^#]/ {print $$1}' iso3166.tab | LC_ALL=C sort -cu
+ $(AWK) '/^[^#]/ {print $$1}' zone.tab | LC_ALL=C sort -c
+ $(AWK) '/^[^#]/ {print substr($$0, 1, 2)}' zone1970.tab | \
+ LC_ALL=C sort -c
+ $(AWK) '/^[^#]/ $(CHECK_CC_LIST)' zone1970.tab | \
+ LC_ALL=C sort -cu
+
check_tables: checktab.awk $(PRIMARY_YDATA) $(ZONETABLES)
for tab in $(ZONETABLES); do \
$(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \
@@ -648,7 +662,7 @@ zic.o: private.h tzfile.h version.h
.KEEP_STATE:
.PHONY: ALL INSTALL all
-.PHONY: check check_character_set check_public check_tables
+.PHONY: check check_character_set check_public check_sorted check_tables
.PHONY: check_time_t_alternatives check_web check_white_space clean clean_misc
.PHONY: install maintainer-clean names posix_packrat posix_only posix_right
.PHONY: public right_only right_posix signatures tarballs typecheck
diff --git a/elsie.nci.nih.gov/src/NEWS b/elsie.nci.nih.gov/src/NEWS
index 8ddd091..4e119ec 100644
--- a/elsie.nci.nih.gov/src/NEWS
+++ b/elsie.nci.nih.gov/src/NEWS
@@ -1,5 +1,132 @@
News for the tz database
+Release 2014i - 2014-10-21 22:04:57 -0700
+
+ Changes affecting future time stamps
+
+ Pacific/Fiji will observe DST from 2014-11-02 02:00 to 2015-01-18 03:00.
+ (Thanks to Ken Rylander for the heads-up.) Guess that future
+ years will use a similar pattern.
+
+ A new Zone Pacific/Bougainville, for the part of Papua New Guinea
+ that plans to switch from UTC+10 to UTC+11 on 2014-12-28 at 02:00.
+ (Thanks to Kiley Walbom for the heads-up.)
+
+ Changes affecting time zone abbreviations
+
+ Since Belarus is not changing its clocks even though Moscow is,
+ the time zone abbreviation in Europe/Minsk is changing from FET
+ to its more-traditional value MSK on 2014-10-26 at 01:00.
+ (Thanks to Alexander Bokovoy for the heads-up about Belarus.)
+
+ The new abbreviation IDT stands for the pre-1976 use of UT+8 in
+ Indochina, to distinguish it better from ICT (UT+7).
+
+ Changes affecting past time stamps
+
+ Many time stamps have been corrected for Asia/Ho_Chi_Minh before 1976
+ (thanks to Trần Ngọc Quân for an indirect pointer to Trần Tiến Bình's
+ authoritative book). Asia/Ho_Chi_Minh has been added to
+ zone1970.tab, to give tzselect users in Vietnam two choices,
+ since north and south Vietnam disagreed after our 1970 cutoff.
+
+ Asia/Phnom_Penh and Asia/Vientiane have been turned into links, as
+ they differed from existing zones only for older time stamps. As
+ usual, these changes affect pre-1970 time stamps only. Their old
+ contents have been moved to the 'backzone' file.
+
+ Changes affecting code
+
+ The time-related library functions now set errno on failure, and
+ some crashes in the new tzalloc-related library functions have
+ been fixed. (Thanks to Christos Zoulas for reporting most of
+ these problems and for suggesting fixes.)
+
+ If USG_COMPAT is defined and the requested time stamp is standard time,
+ the tz library's localtime and mktime functions now set the extern
+ variable timezone to a value appropriate for that time stamp; and
+ similarly for ALTZONE, daylight saving time, and the altzone variable.
+ This change is a companion to the tzname change in 2014h, and is
+ designed to make timezone and altzone more compatible with tzname.
+
+ The tz library's functions now set errno to EOVERFLOW if they fail
+ because the result cannot be represented. ctime and ctime_r now
+ return NULL and set errno when a time stamp is out of range, rather
+ than having undefined behavior.
+
+ Some bugs associated with the new 2014g functions have been fixed.
+ This includes a bug that largely incapacitated the new functions
+ time2posix_z and posix2time_z. (Thanks to Christos Zoulas.)
+ It also includes some uses of uninitialized variables after tzalloc.
+ The new code uses the standard type 'ssize_t', which the Makefile
+ now gives porting advice about.
+
+ Changes affecting commentary
+
+ Updated URLs for NRC Canada (thanks to Matt Johnson and Brian Inglis).
+
+
+Release 2014h - 2014-09-25 18:59:03 -0700
+
+ Changes affecting past time stamps
+
+ America/Jamaica's 1974 spring-forward transition was Jan. 6, not Apr. 28.
+
+ Shanks says Asia/Novokuznetsk switched from LMT (not "NMT") on 1924-05-01,
+ not 1920-01-06. The old entry was based on a misinterpretation of Shanks.
+
+ Some more zones have been turned into links, when they differed
+ from existing zones only for older time stamps. As usual,
+ these changes affect UTC offsets in pre-1970 time stamps only.
+ Their old contents have been moved to the 'backzone' file.
+ The affected zones are: Africa/Blantyre, Africa/Bujumbura,
+ Africa/Gaborone, Africa/Harare, Africa/Kigali, Africa/Lubumbashi,
+ Africa/Lusaka, Africa/Maseru, and Africa/Mbabane.
+
+ Changes affecting code
+
+ zdump -V and -v now output gmtoff= values on all platforms,
+ not merely on platforms defining TM_GMTOFF.
+
+ The tz library's localtime and mktime functions now set tzname to a value
+ appropriate for the requested time stamp, and zdump now uses this
+ on platforms not defining TM_ZONE, fixing a 2014g regression.
+ (Thanks to Tim Parenti for reporting the problem.)
+
+ The tz library no longer sets tzname if localtime or mktime fails.
+
+ zdump -c no longer mishandles transitions near year boundaries.
+ (Thanks to Tim Parenti for reporting the problem.)
+
+ An access to uninitalized data has been fixed.
+ (Thanks to Jörg Richter for reporting the problem.)
+
+ When THREAD_SAFE is defined, the code ports to the C11 memory model.
+ A memory leak has been fixed if ALL_STATE and THREAD_SAFE are defined
+ and two threads race to initialize data used by gmtime-like functions.
+ (Thanks to Andy Heninger for reporting the problems.)
+
+ Changes affecting build procedure
+
+ 'make check' now checks better for properly-sorted data.
+
+ Changes affecting documentation and commentary
+
+ zdump's gmtoff=N output is now documented, and its isdst=D output
+ is now documented to possibly output D values other than 0 or 1.
+
+ zdump -c's treatment of years is now documented to use the
+ Gregorian calendar and Universal Time without leap seconds,
+ and its behavior at cutoff boundaries is now documented better.
+ (Thanks to Arthur David Olson and Tim Parenti for reporting the problems.)
+
+ Programs are now documented to use the proleptic Gregorian calendar.
+ (Thanks to Alan Barrett for the suggestion.)
+
+ Fractional-second GMT offsets have been documented for civil time
+ in 19th-century Chennai, Jakarta, and New York.
+
+
Release 2014g - 2014-08-28 12:31:23 -0700
Changes affecting future time stamps
diff --git a/elsie.nci.nih.gov/src/Theory b/elsie.nci.nih.gov/src/Theory
index a16ce3e..e9be715 100644
--- a/elsie.nci.nih.gov/src/Theory
+++ b/elsie.nci.nih.gov/src/Theory
@@ -103,7 +103,7 @@ POSIX has the following properties and limitations.
signed time_t values stop working after 2038-01-19 03:14:07 UTC, so
new implementations these days typically use a signed 64-bit integer.
Unsigned 32-bit integers are used on one or two platforms,
- and 36-bit integers are also used occasionally.
+ and 36-bit and 40-bit integers are also used occasionally.
Although earlier POSIX versions allowed time_t to be a
floating-point type, this was not supported by any practical
systems, and POSIX.1-2013 and the tz code both require time_t
@@ -318,7 +318,7 @@ Errors in the tz database arise from many sources:
way to specify Easter, these exceptional years are entered as
separate tz Rule lines, even though the legal rules did not change.
- * The tz database models pre-standard time using the Gregorian
+ * The tz database models pre-standard time using the proleptic Gregorian
calendar and local mean time (LMT), but many people used other
calendars and other timescales. For example, the Roman Empire used
the Julian calendar, and had 12 varying-length daytime hours with a
diff --git a/elsie.nci.nih.gov/src/africa b/elsie.nci.nih.gov/src/africa
index 6f7ad7a..b17c62b 100644
--- a/elsie.nci.nih.gov/src/africa
+++ b/elsie.nci.nih.gov/src/africa
@@ -110,23 +110,13 @@ Zone Africa/Algiers 0:12:12 - LMT 1891 Mar 15 0:01
# See Africa/Lagos.
# Botswana
-# From Paul Eggert (2013-02-21):
-# Milne says they were regulated by the Cape Town Signal in 1899;
-# assume they switched to 2:00 when Cape Town did.
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Africa/Gaborone 1:43:40 - LMT 1885
- 1:30 - SAST 1903 Mar
- 2:00 - CAT 1943 Sep 19 2:00
- 2:00 1:00 CAST 1944 Mar 19 2:00
- 2:00 - CAT
+# See Africa/Maputo.
# Burkina Faso
# See Africa/Abidjan.
# Burundi
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Africa/Bujumbura 1:57:28 - LMT 1890
- 2:00 - CAT
+# See Africa/Maputo.
# Cameroon
# See Africa/Lagos.
@@ -161,10 +151,7 @@ Zone Indian/Comoro 2:53:04 - LMT 1911 Jul # Moroni, Gran Comoro
3:00 - EAT
# Democratic Republic of the Congo
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Africa/Lubumbashi 1:49:52 - LMT 1897 Nov 9
- 2:00 - CAT
-# The above is for the eastern part; see Africa/Lagos for the western part.
+# See Africa/Lagos for the western part and Africa/Maputo for the eastern.
# Republic of the Congo
# See Africa/Lagos.
@@ -316,7 +303,7 @@ Rule Egypt 2007 only - Sep Thu>=1 24:00 0 -
# Egypt is to change back to Daylight system on May 15
# http://english.ahram.org.eg/NewsContent/1/64/100735/Egypt/Politics-/Egypts-government-to-reapply-daylight-saving-time-.aspx
-# From Gunther Vermier (2015-05-13):
+# From Gunther Vermier (2014-05-13):
# our Egypt office confirms that the change will be at 15 May "midnight" (24:00)
# From Imed Chihi (2014-06-04):
@@ -466,11 +453,7 @@ Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul
3:00 - EAT
# Lesotho
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Africa/Maseru 1:50:00 - LMT 1903 Mar
- 2:00 - SAST 1943 Sep 19 2:00
- 2:00 1:00 SAST 1944 Mar 19 2:00
- 2:00 - SAST
+# See Africa/Johannesburg.
# Liberia
# From Paul Eggert (2006-03-22):
@@ -552,9 +535,7 @@ Zone Indian/Antananarivo 3:10:04 - LMT 1911 Jul
3:00 - EAT
# Malawi
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Africa/Blantyre 2:20:00 - LMT 1903 Mar
- 2:00 - CAT
+# See Africa/Maputo.
# Mali
# Mauritania
@@ -964,6 +945,13 @@ Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Maputo 2:10:20 - LMT 1903 Mar
2:00 - CAT
+Link Africa/Maputo Africa/Blantyre # Malawi
+Link Africa/Maputo Africa/Bujumbura # Burundi
+Link Africa/Maputo Africa/Gaborone # Botswana
+Link Africa/Maputo Africa/Harare # Zimbabwe
+Link Africa/Maputo Africa/Kigali # Rwanda
+Link Africa/Maputo Africa/Lubumbashi # E Dem. Rep. of Congo
+Link Africa/Maputo Africa/Lusaka # Zambia
# Namibia
# The 1994-04-03 transition is from Shanks & Pottenger.
@@ -1031,9 +1019,7 @@ Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis
# Tromelin - inhabited until at least 1958
# Rwanda
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Africa/Kigali 2:00:16 - LMT 1935 Jun
- 2:00 - CAT
+# See Africa/Maputo.
# St Helena
# See Africa/Abidjan.
@@ -1077,6 +1063,9 @@ Rule SA 1943 1944 - Mar Sun>=15 2:00 0 -
Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8
1:30 - SAST 1903 Mar
2:00 SA SAST
+Link Africa/Johannesburg Africa/Maseru # Lesotho
+Link Africa/Johannesburg Africa/Mbabane # Swaziland
+#
# Marion and Prince Edward Is
# scientific station since 1947
# no information
@@ -1104,9 +1093,7 @@ Zone Africa/Khartoum 2:10:08 - LMT 1931
Link Africa/Khartoum Africa/Juba
# Swaziland
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Africa/Mbabane 2:04:24 - LMT 1903 Mar
- 2:00 - SAST
+# See Africa/Johannesburg.
# Tanzania
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -1227,11 +1214,5 @@ Zone Africa/Kampala 2:09:40 - LMT 1928 Jul
3:00 - EAT
# Zambia
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Africa/Lusaka 1:53:08 - LMT 1903 Mar
- 2:00 - CAT
-
# Zimbabwe
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Africa/Harare 2:04:12 - LMT 1903 Mar
- 2:00 - CAT
+# See Africa/Maputo.
diff --git a/elsie.nci.nih.gov/src/asctime.c b/elsie.nci.nih.gov/src/asctime.c
index 0ce1209..1a906b6 100644
--- a/elsie.nci.nih.gov/src/asctime.c
+++ b/elsie.nci.nih.gov/src/asctime.c
@@ -112,11 +112,7 @@ asctime_r(register const struct tm *timeptr, char *buf)
if (strlen(result) < STD_ASCTIME_BUF_SIZE || buf == buf_asctime)
return strcpy(buf, result);
else {
-#ifdef EOVERFLOW
errno = EOVERFLOW;
-#else /* !defined EOVERFLOW */
- errno = EINVAL;
-#endif /* !defined EOVERFLOW */
return NULL;
}
}
diff --git a/elsie.nci.nih.gov/src/asia b/elsie.nci.nih.gov/src/asia
index 806a8c7..37b2c88 100644
--- a/elsie.nci.nih.gov/src/asia
+++ b/elsie.nci.nih.gov/src/asia
@@ -47,10 +47,11 @@
# 3:30 IRST IRDT Iran
# 4:00 GST Gulf*
# 5:30 IST India
-# 7:00 ICT Indochina*
+# 7:00 ICT Indochina, most times and locations*
# 7:00 WIB west Indonesia (Waktu Indonesia Barat)
# 8:00 WITA central Indonesia (Waktu Indonesia Tengah)
# 8:00 CST China
+# 8:00 IDT Indochina, 1943-45, 1947-55, 1960-75 (some locations)*
# 8:00 JWST Western Standard Time (Japan, 1896/1937)*
# 9:00 JCST Central Standard Time (Japan, 1896/1937)
# 9:00 WIT east Indonesia (Waktu Indonesia Timur)
@@ -271,12 +272,8 @@ Zone Asia/Rangoon 6:24:40 - LMT 1880 # or Yangon
6:30 - MMT # Myanmar Time
# Cambodia
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Asia/Phnom_Penh 6:59:40 - LMT 1906 Jun 9
- 7:06:20 - SMT 1911 Mar 11 0:01 # Saigon MT?
- 7:00 - ICT 1912 May
- 8:00 - ICT 1931 May
- 7:00 - ICT
+# See Asia/Bangkok.
+
# China
@@ -893,6 +890,10 @@ Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata
# Indonesia
#
+# From Paul Eggert (2014-09-06):
+# The 1876 Report of the Secretary of the [US] Navy, p 306 says that Batavia
+# civil time was 7:07:12.5; round to even for Jakarta.
+#
# From Gwillim Law (2001-05-28), overriding Shanks & Pottenger:
# http://www.sumatera-inc.com/go_to_invest/about_indonesia.asp#standtime
# says that Indonesia's time zones changed on 1988-01-01. Looking at some
@@ -1710,12 +1711,8 @@ Zone Asia/Kuwait 3:11:56 - LMT 1950
3:00 - AST
# Laos
-# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Asia/Vientiane 6:50:24 - LMT 1906 Jun 9 # or Viangchan
- 7:06:20 - SMT 1911 Mar 11 0:01 # Saigon MT?
- 7:00 - ICT 1912 May
- 8:00 - ICT 1931 May
- 7:00 - ICT
+# See Asia/Bangkok.
+
# Lebanon
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
@@ -2728,6 +2725,8 @@ Zone Asia/Dushanbe 4:35:12 - LMT 1924 May 2
Zone Asia/Bangkok 6:42:04 - LMT 1880
6:42:04 - BMT 1920 Apr # Bangkok Mean Time
7:00 - ICT
+Link Asia/Bangkok Asia/Phnom_Penh # Cambodia
+Link Asia/Bangkok Asia/Vientiane # Laos
# Turkmenistan
# From Shanks & Pottenger.
@@ -2765,22 +2764,65 @@ Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2
# Vietnam
-# From Paul Eggert (2013-02-21):
+# From Paul Eggert (2014-10-04):
# Milne gives 7:16:56 for the meridian of Saigon in 1899, as being
# used in Lower Laos, Cambodia, and Annam. But this is quite a ways
# from Saigon's location. For now, ignore this and stick with Shanks
-# and Pottenger.
+# and Pottenger for LMT before 1906.
# From Arthur David Olson (2008-03-18):
# The English-language name of Vietnam's most populous city is "Ho Chi Minh
# City"; use Ho_Chi_Minh below to avoid a name of more than 14 characters.
-# From Shanks & Pottenger:
+# From Paul Eggert (2014-10-21) after a heads-up from Trần Ngọc Quân:
+# Trần Tiến Bình's authoritative book "Lịch Việt Nam: thế kỷ XX-XXI (1901-2100)"
+# (Nhà xuất bản Văn Hoá - Thông Tin, Hanoi, 2005), pp 49-50,
+# is quoted verbatim in:
+# http://www.thoigian.com.vn/?mPage=P80D01
+# is translated by Brian Inglis in:
+# http://mm.icann.org/pipermail/tz/2014-October/021654.html
+# and is the basis for the information below.
+#
+# The 1906 transition was effective July 1 and standardized Indochina to
+# Phù Liễn Observatory, legally 104 deg. 17'17" east of Paris.
+# It's unclear whether this meant legal Paris Mean Time (00:09:21) or
+# the Paris Meridian (2 deg. 20'14.03" E); the former yields 07:06:30.1333...
+# and the latter 07:06:29.333... so either way it rounds to 07:06:30,
+# which is used below even though the modern-day Phù Liễn Observatory
+# is closer to 07:06:31. Abbreviate Phù Liễn Mean Time as PLMT.
+#
+# The following transitions occurred in Indochina in general (before 1954)
+# and in South Vietnam in particular (after 1954):
+# To 07:00 on 1911-05-01.
+# To 08:00 on 1942-12-31 at 23:00.
+# To 09:00 in 1945-03-14 at 23:00.
+# To 07:00 on 1945-09-02 in Vietnam.
+# To 08:00 on 1947-04-01 in French-controlled Indochina.
+# To 07:00 on 1955-07-01 in South Vietnam.
+# To 08:00 on 1959-12-31 at 23:00 in South Vietnam.
+# To 07:00 on 1975-06-13 in South Vietnam.
+#
+# Trần cites the following sources; it's unclear which supplied the info above.
+#
+# Hoàng Xuân Hãn: "Lịch và lịch Việt Nam". Tập san Khoa học Xã hội,
+# No. 9, Paris, February 1982.
+#
+# Lê Thành Lân: "Lịch và niên biểu lịch sử hai mươi thế kỷ (0001-2010)",
+# NXB Thống kê, Hanoi, 2000.
+#
+# Lê Thành Lân: "Lịch hai thế kỷ (1802-2010) và các lịch vĩnh cửu",
+# NXB Thuận Hoá, Huế, 1995.
+
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jun 9
- 7:06:20 - SMT 1911 Mar 11 0:01 # Saigon MT?
- 7:00 - ICT 1912 May
- 8:00 - ICT 1931 May
+Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jul 1
+ 7:06:30 - PLMT 1911 May 1
+ 7:00 - ICT 1942 Dec 31 23:00
+ 8:00 - IDT 1945 Mar 14 23:00
+ 9:00 - JST 1945 Sep 2
+ 7:00 - ICT 1947 Apr 1
+ 8:00 - IDT 1955 Jul 1
+ 7:00 - ICT 1959 Dec 31 23:00
+ 8:00 - IDT 1975 Jun 13
7:00 - ICT
# Yemen
diff --git a/elsie.nci.nih.gov/src/australasia b/elsie.nci.nih.gov/src/australasia
index 5ea1f18..8efe56f 100644
--- a/elsie.nci.nih.gov/src/australasia
+++ b/elsie.nci.nih.gov/src/australasia
@@ -331,20 +331,27 @@ Zone Indian/Cocos 6:27:40 - LMT 1900
# Fiji will end DST on 2014-01-19 02:00:
# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVINGS-TO-END-THIS-MONTH-%281%29.aspx
-# From Paul Eggert (2014-01-10):
-# For now, guess that Fiji springs forward the Sunday before the fourth
-# Monday in October, and springs back the penultimate Sunday in January.
-# This is ad hoc, but matches recent practice.
+# From Ken Rylander (2014-10-20):
+# 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):
+# 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
+# practice than guessing no DST.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 S
Rule Fiji 1999 2000 - Feb lastSun 3:00 0 -
Rule Fiji 2009 only - Nov 29 2:00 1:00 S
Rule Fiji 2010 only - Mar lastSun 3:00 0 -
-Rule Fiji 2010 max - Oct Sun>=21 2:00 1:00 S
+Rule Fiji 2010 2013 - Oct Sun>=21 2:00 1:00 S
Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 -
-Rule Fiji 2014 max - Jan Sun>=18 2: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 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
12:00 Fiji FJ%sT # Fiji Time
@@ -519,6 +526,30 @@ Zone Pacific/Palau 8:57:56 - LMT 1901 # Koror
Zone Pacific/Port_Moresby 9:48:40 - LMT 1880
9:48:32 - PMMT 1895 # Port Moresby Mean Time
10:00 - PGT # Papua New Guinea Time
+#
+# From Paul Eggert (2014-10-13):
+# Base the Bougainville entry on the Arawa-Kieta region, which appears to have
+# the most people even though it was devastated in the Bougainville Civil War.
+#
+# Although Shanks gives 1942-03-15 / 1943-11-01 for JST, these dates
+# are apparently rough guesswork from the starts of military campaigns.
+# The World War II entries below are instead based on Arawa-Kieta.
+# The Japanese occupied Kieta in July 1942,
+# according to the Pacific War Online Encyclopedia
+# http://pwencycl.kgbudge.com/B/o/Bougainville.htm
+# and seem to have controlled it until their 1945-08-21 surrender.
+#
+# The Autonomous Region of Bougainville plans to switch from UTC+10 to UTC+11
+# on 2014-12-28 at 02:00. They call UTC+11 "Bougainville Standard Time";
+# abbreviate this as BST. See:
+# http://www.bougainville24.com/bougainville-issues/bougainville-gets-own-timezone/
+#
+Zone Pacific/Bougainville 10:22:16 - LMT 1880
+ 9:48:32 - PMMT 1895
+ 10:00 - PGT 1942 Jul
+ 9:00 - JST 1945 Aug 21
+ 10:00 - PGT 2014 Dec 28 2:00
+ 11:00 - BST
# Pitcairn
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -803,6 +834,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# 10:00 AEST AEDT Eastern Australia
# 10:00 ChST Chamorro
# 10:30 LHST LHDT Lord Howe*
+# 11:00 BST Bougainville*
# 11:30 NZMT NZST New Zealand through 1945
# 12:00 NZST NZDT New Zealand 1946-present
# 12:15 CHAST Chatham through 1945*
diff --git a/elsie.nci.nih.gov/src/backzone b/elsie.nci.nih.gov/src/backzone
index d9183cd..29320aa 100644
--- a/elsie.nci.nih.gov/src/backzone
+++ b/elsie.nci.nih.gov/src/backzone
@@ -57,10 +57,18 @@ Zone Africa/Banjul -1:06:36 - LMT 1912
-1:00 - WAT 1964
0:00 - GMT
+# Malawi
+Zone Africa/Blantyre 2:20:00 - LMT 1903 Mar
+ 2:00 - CAT
+
# Republic of the Congo
Zone Africa/Brazzaville 1:01:08 - LMT 1912
1:00 - WAT
+# Burundi
+Zone Africa/Bujumbura 1:57:28 - LMT 1890
+ 2:00 - CAT
+
# Guinea
Zone Africa/Conakry -0:54:52 - LMT 1912
0:00 - GMT 1934 Feb 26
@@ -92,11 +100,29 @@ Zone Africa/Freetown -0:53:00 - LMT 1882
-1:00 SL %s 1957
0:00 SL %s
+# Botswana
+# From Paul Eggert (2013-02-21):
+# Milne says they were regulated by the Cape Town Signal in 1899;
+# assume they switched to 2:00 when Cape Town did.
+Zone Africa/Gaborone 1:43:40 - LMT 1885
+ 1:30 - SAST 1903 Mar
+ 2:00 - CAT 1943 Sep 19 2:00
+ 2:00 1:00 CAST 1944 Mar 19 2:00
+ 2:00 - CAT
+
+# Zimbabwe
+Zone Africa/Harare 2:04:12 - LMT 1903 Mar
+ 2:00 - CAT
+
# South Sudan
Zone Africa/Juba 2:06:24 - LMT 1931
2:00 Sudan CA%sT 2000 Jan 15 12:00
3:00 - EAT
+# Rwanda
+Zone Africa/Kigali 2:00:16 - LMT 1935 Jun
+ 2:00 - CAT
+
# Democratic Republic of the Congo (west)
Zone Africa/Kinshasa 1:01:12 - LMT 1897 Nov 9
1:00 - WAT
@@ -105,6 +131,10 @@ Zone Africa/Kinshasa 1:01:12 - LMT 1897 Nov 9
Zone Africa/Libreville 0:37:48 - LMT 1912
1:00 - WAT
+# Togo
+Zone Africa/Lome 0:04:52 - LMT 1893
+ 0:00 - GMT
+
# Angola
#
# Shanks gives 1911-05-26 for the transition to WAT,
@@ -116,9 +146,13 @@ Zone Africa/Luanda 0:52:56 - LMT 1892
0:52:04 - AOT 1912 Jan 1 # Angola Time
1:00 - WAT
-# Togo
-Zone Africa/Lome 0:04:52 - LMT 1893
- 0:00 - GMT
+# Democratic Republic of the Congo (east)
+Zone Africa/Lubumbashi 1:49:52 - LMT 1897 Nov 9
+ 2:00 - CAT
+
+# Zambia
+Zone Africa/Lusaka 1:53:08 - LMT 1903 Mar
+ 2:00 - CAT
# Equatorial Guinea
#
@@ -131,6 +165,16 @@ Zone Africa/Malabo 0:35:08 - LMT 1912
0:00 - GMT 1963 Dec 15
1:00 - WAT
+# Lesotho
+Zone Africa/Maseru 1:50:00 - LMT 1903 Mar
+ 2:00 - SAST 1943 Sep 19 2:00
+ 2:00 1:00 SAST 1944 Mar 19 2:00
+ 2:00 - SAST
+
+# Swaziland
+Zone Africa/Mbabane 2:04:24 - LMT 1903 Mar
+ 2:00 - SAST
+
# Niger
Zone Africa/Niamey 0:08:28 - LMT 1912
-1:00 - WAT 1934 Feb 26
@@ -262,6 +306,11 @@ Zone Antarctica/McMurdo 0 - zzz 1956
Link Antarctica/McMurdo Antarctica/South_Pole
# India
+#
+# From Paul Eggert (2014-09-06):
+# The 1876 Report of the Secretary of the [US] Navy, p 305 says that Madras
+# civil time was 5:20:57.3.
+#
# From Paul Eggert (2014-08-21):
# In tomorrow's The Hindu, Nitya Menon reports that India had two civil time
# zones starting in 1884, one in Bombay and one in Calcutta, and that railways
@@ -271,16 +320,6 @@ Link Antarctica/McMurdo Antarctica/South_Pole
#Zone Asia/Chennai [not enough info to complete]
# China
-# Changbai Time ("Long-white Time", Long-white = Heilongjiang area)
-# Heilongjiang (except Mohe county), Jilin
-Zone Asia/Harbin 8:26:44 - LMT 1928 # or Haerbin
- 8:30 - CHAT 1932 Mar # Changbai Time
- 8:00 - CST 1940
- 9:00 - CHAT 1966 May
- 8:30 - CHAT 1980 May
- 8:00 PRC C%sT
-
-# China
# Long-shu Time (probably due to Long and Shu being two names of that area)
# Guangxi, Guizhou, Hainan, Ningxia, Sichuan, Shaanxi, and Yunnan;
# most of Gansu; west Inner Mongolia; west Qinghai; and the Guangdong
@@ -291,6 +330,30 @@ Zone Asia/Chongqing 7:06:20 - LMT 1928 # or Chungking
8:00 PRC C%sT
Link Asia/Chongqing Asia/Chungking
+# Vietnam
+# From Paul Eggert (2014-10-13):
+# See Asia/Ho_Chi_Minh for the source for this data.
+# Trần's book says the 1954-55 transition to 07:00 in Hanoi was in
+# October 1954, with exact date and time unspecified.
+Zone Asia/Hanoi 7:03:24 - LMT 1906 Jul 1
+ 7:06:30 - PLMT 1911 May 1
+ 7:00 - ICT 1942 Dec 31 23:00
+ 8:00 - IDT 1945 Mar 14 23:00
+ 9:00 - JST 1945 Sep 2
+ 7:00 - ICT 1947 Apr 1
+ 8:00 - IDT 1954 Oct
+ 7:00 - ICT
+
+# China
+# Changbai Time ("Long-white Time", Long-white = Heilongjiang area)
+# Heilongjiang (except Mohe county), Jilin
+Zone Asia/Harbin 8:26:44 - LMT 1928 # or Haerbin
+ 8:30 - CHAT 1932 Mar # Changbai Time
+ 8:00 - CST 1940
+ 9:00 - CHAT 1966 May
+ 8:30 - CHAT 1980 May
+ 8:00 PRC C%sT
+
# far west China
Zone Asia/Kashgar 5:03:56 - LMT 1928 # or Kashi or Kaxgar
5:30 - KAST 1940 # Kashgar Time
@@ -304,11 +367,42 @@ Zone Asia/Kashgar 5:03:56 - LMT 1928 # or Kashi or Kaxgar
# Portuguese India switched to GMT+5 on 1912-01-01.
#Zone Asia/Panaji [not enough info to complete]
+# Cambodia
+# From Paul Eggert (2014-10-11):
+# See Asia/Ho_Chi_Minh for the source for most of this data. Also, guess
+# (1) Cambodia reverted to UT+7 on 1945-09-02, when Vietnam did, and
+# (2) they also reverted to UT+7 on 1953-11-09, the date of independence.
+# These guesses are probably wrong but they're better than guessing no
+# transitions there.
+Zone Asia/Phnom_Penh 6:59:40 - LMT 1906 Jul 1
+ 7:06:30 - PLMT 1911 May 1
+ 7:00 - ICT 1942 Dec 31 23:00
+ 8:00 - IDT 1945 Mar 14 23:00
+ 9:00 - JST 1945 Sep 2
+ 7:00 - ICT 1947 Apr 1
+ 8:00 - IDT 1953 Nov 9
+ 7:00 - ICT
+
# Israel
Zone Asia/Tel_Aviv 2:19:04 - LMT 1880
2:21 - JMT 1918
2:00 Zion I%sT
+# Laos
+# From Paul Eggert (2014-10-11):
+# See Asia/Ho_Chi_Minh for the source for most of this data.
+# Trần's book says that Laos reverted to UT+7 on 1955-04-15.
+# Also, guess that Laos reverted to UT+7 on 1945-09-02, when Vietnam did;
+# this is probably wrong but it's better than guessing no transition.
+Zone Asia/Vientiane 6:50:24 - LMT 1906 Jul 1
+ 7:06:30 - PLMT 1911 May 1
+ 7:00 - ICT 1942 Dec 31 23:00
+ 8:00 - IDT 1945 Mar 14 23:00
+ 9:00 - JST 1945 Sep 2
+ 7:00 - ICT 1947 Apr 1
+ 8:00 - IDT 1955 Apr 15
+ 7:00 - ICT
+
# Jan Mayen
# From Whitman:
Zone Atlantic/Jan_Mayen -1:00 - EGT
diff --git a/elsie.nci.nih.gov/src/checktab.awk b/elsie.nci.nih.gov/src/checktab.awk
index 0f113f4..55baa54 100644
--- a/elsie.nci.nih.gov/src/checktab.awk
+++ b/elsie.nci.nih.gov/src/checktab.awk
@@ -17,28 +17,16 @@ BEGIN {
if (zone_table == "zone1970.tab") {
tztab["Africa/Addis_Ababa"] = 1
tztab["Africa/Asmara"] = 1
- tztab["Africa/Blantyre"] = 1
- tztab["Africa/Bujumbura"] = 1
tztab["Africa/Dar_es_Salaam"] = 1
tztab["Africa/Djibouti"] = 1
- tztab["Africa/Gaborone"] = 1
- tztab["Africa/Harare"] = 1
tztab["Africa/Kampala"] = 1
- tztab["Africa/Kigali"] = 1
- tztab["Africa/Lubumbashi"] = 1
- tztab["Africa/Lusaka"] = 1
- tztab["Africa/Maseru"] = 1
- tztab["Africa/Mbabane"] = 1
tztab["Africa/Mogadishu"] = 1
tztab["America/Antigua"] = 1
tztab["America/Cayman"] = 1
tztab["Asia/Aden"] = 1
tztab["Asia/Bahrain"] = 1
- tztab["Asia/Ho_Chi_Minh"] = 1
tztab["Asia/Kuwait"] = 1
tztab["Asia/Muscat"] = 1
- tztab["Asia/Phnom_Penh"] = 1
- tztab["Asia/Vientiane"] = 1
tztab["Indian/Antananarivo"] = 1
tztab["Indian/Comoro"] = 1
tztab["Indian/Mayotte"] = 1
diff --git a/elsie.nci.nih.gov/src/europe b/elsie.nci.nih.gov/src/europe
index 0130552..27a8b30 100644
--- a/elsie.nci.nih.gov/src/europe
+++ b/elsie.nci.nih.gov/src/europe
@@ -68,10 +68,11 @@
# 0:00 WET WEST WEMT Western Europe
# 0:19:32.13 AMT NST Amsterdam, Netherlands Summer (1835-1937)*
# 0:20 NET NEST Netherlands (1937-1940)*
+# 1:00 BST British Standard (1968-1971)
# 1:00 CET CEST CEMT Central Europe
# 1:00:14 SET Swedish (1879-1899)*
# 2:00 EET EEST Eastern Europe
-# 3:00 FET Further-eastern Europe*
+# 3:00 FET Further-eastern Europe (2011-2014)*
# 3:00 MSK MSD MSM* Moscow
# From Peter Ilieve (1994-12-04),
@@ -723,6 +724,13 @@ Zone Europe/Vienna 1:05:21 - LMT 1893 Apr
# http://www.belta.by/ru/all_news/society/V-Belarusi-otmenjaetsja-perexod-na-sezonnoe-vremja_i_572952.html
# http://naviny.by/rubrics/society/2011/09/16/ic_articles_116_175144/
# http://news.tut.by/society/250578.html
+#
+# From Alexander Bokovoy (2014-10-09):
+# Belarussian government decided against changing to winter time....
+# http://eng.belta.by/all_news/society/Belarus-decides-against-adjusting-time-in-Russias-wake_i_76335.html
+# From Paul Eggert (2014-10-08):
+# Hence Belarus can share time zone abbreviations with Moscow again.
+#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Minsk 1:50:16 - LMT 1880
1:50 - MMT 1924 May 2 # Minsk Mean Time
@@ -735,7 +743,8 @@ Zone Europe/Minsk 1:50:16 - LMT 1880
2:00 - EET 1992 Mar 29 0:00s
2:00 1:00 EEST 1992 Sep 27 0:00s
2:00 Russia EE%sT 2011 Mar 27 2:00s
- 3:00 - FET
+ 3:00 - FET 2014 Oct 26 1:00s
+ 3:00 - MSK
# Belgium
#
@@ -2501,7 +2510,7 @@ Zone Asia/Novosibirsk 5:31:40 - LMT 1919 Dec 14 6:00
# The Kemerovo region will remain at UTC+7 through the 2014-10-26 change, thus
# realigning itself with KRAT.
-Zone Asia/Novokuznetsk 5:48:48 - NMT 1920 Jan 6
+Zone Asia/Novokuznetsk 5:48:48 - LMT 1924 May 1
6:00 - KRAT 1930 Jun 21 # Krasnoyarsk Time
7:00 Russia KRA%sT 1991 Mar 31 2:00s
6:00 Russia KRA%sT 1992 Jan 19 2:00s
diff --git a/elsie.nci.nih.gov/src/localtime.c b/elsie.nci.nih.gov/src/localtime.c
index 622f7d4..63a1816 100644
--- a/elsie.nci.nih.gov/src/localtime.c
+++ b/elsie.nci.nih.gov/src/localtime.c
@@ -18,12 +18,10 @@
#if THREAD_SAFE
# include <pthread.h>
-# define VOLATILE volatile
static pthread_mutex_t locallock = PTHREAD_MUTEX_INITIALIZER;
static int lock(void) { return pthread_mutex_lock(&locallock); }
static void unlock(void) { pthread_mutex_unlock(&locallock); }
#else
-# define VOLATILE
static int lock(void) { return 0; }
static void unlock(void) { }
#endif
@@ -176,7 +174,7 @@ static struct state gmtmem;
#endif /* !defined TZ_STRLEN_MAX */
static char lcl_TZname[TZ_STRLEN_MAX + 1];
-static int VOLATILE lcl_is_set;
+static int lcl_is_set;
char * tzname[2] = {
(char *) wildabbr,
@@ -202,6 +200,17 @@ int daylight = 0;
long altzone = 0;
#endif /* defined ALTZONE */
+/* Initialize *S to a value based on GMTOFF, ISDST, and ABBRIND. */
+static void
+init_ttinfo(struct ttinfo *s, int_fast32_t gmtoff, bool isdst, int abbrind)
+{
+ s->tt_gmtoff = gmtoff;
+ s->tt_isdst = isdst;
+ s->tt_abbrind = abbrind;
+ s->tt_ttisstd = false;
+ s->tt_ttisgmt = false;
+}
+
static int_fast32_t
detzcode(const char *const codep)
{
@@ -298,67 +307,64 @@ differ_by_repeat(const time_t t1, const time_t t0)
return t1 - t0 == SECSPERREPEAT;
}
-static bool
-tzload(register const char *name, register struct state *const sp,
- bool doextend)
+/* Input buffer for data read from a compiled tz file. */
+union input_buffer {
+ /* The first part of the buffer, interpreted as a header. */
+ struct tzhead tzhead;
+
+ /* The entire buffer. */
+ char buf[2 * sizeof(struct tzhead) + 2 * sizeof (struct state)
+ + 4 * TZ_MAX_TIMES];
+};
+
+/* Local storage needed for 'tzloadbody'. */
+union local_storage {
+ /* The file name to be opened. */
+ char fullname[FILENAME_MAX + 1];
+
+ /* The results of analyzing the file's contents after it is opened. */
+ struct {
+ /* The input buffer. */
+ union input_buffer u;
+
+ /* A temporary state used for parsing a TZ string in the file. */
+ struct state st;
+ } u;
+};
+
+/* Load tz data from the file named NAME into *SP. Read extended
+ format if DOEXTEND. Use *LSP for temporary storage. Return 0 on
+ success, an errno value on failure. */
+static int
+tzloadbody(char const *name, struct state *sp, bool doextend,
+ union local_storage *lsp)
{
- register const char * p;
register int i;
register int fid;
register int stored;
- register int nread;
- typedef union {
- struct tzhead tzhead;
- char buf[2 * sizeof(struct tzhead) +
- 2 * sizeof *sp +
- 4 * TZ_MAX_TIMES];
- } u_t;
- union local_storage {
- /*
- ** Section 4.9.1 of the C standard says that
- ** "FILENAME_MAX expands to an integral constant expression
- ** that is the size needed for an array of char large enough
- ** to hold the longest file name string that the implementation
- ** guarantees can be opened."
- */
- char fullname[FILENAME_MAX + 1];
-
- /* The main part of the storage for this function. */
- struct {
- u_t u;
- struct state st;
- } u;
- };
- register char *fullname;
- register u_t *up;
+ register ssize_t nread;
register bool doaccess;
- register union local_storage *lsp;
-#ifdef ALL_STATE
- lsp = malloc(sizeof *lsp);
- if (!lsp)
- return false;
-#else /* !defined ALL_STATE */
- union local_storage ls;
- lsp = &ls;
-#endif /* !defined ALL_STATE */
- fullname = lsp->fullname;
- up = &lsp->u.u;
+ register char *fullname = lsp->fullname;
+ register union input_buffer *up = &lsp->u.u;
+ register int tzheadsize = sizeof (struct tzhead);
sp->goback = sp->goahead = false;
if (! name) {
name = TZDEFAULT;
if (! name)
- goto oops;
+ return EINVAL;
}
if (name[0] == ':')
++name;
doaccess = name[0] == '/';
if (!doaccess) {
- p = TZDIR;
- if (! p || sizeof lsp->fullname - 1 <= strlen(p) + strlen(name))
- goto oops;
+ char const *p = TZDIR;
+ if (! p)
+ return EINVAL;
+ if (sizeof lsp->fullname - 1 <= strlen(p) + strlen(name))
+ return ENAMETOOLONG;
strcpy(fullname, p);
strcat(fullname, "/");
strcat(fullname, name);
@@ -368,14 +374,19 @@ tzload(register const char *name, register struct state *const sp,
name = fullname;
}
if (doaccess && access(name, R_OK) != 0)
- goto oops;
+ return errno;
fid = open(name, OPEN_MODE);
if (fid < 0)
- goto oops;
+ return errno;
nread = read(fid, up->buf, sizeof up->buf);
- if (close(fid) < 0 || nread <= 0)
- goto oops;
+ if (nread < tzheadsize) {
+ int err = nread < 0 ? errno : EINVAL;
+ close(fid);
+ return err;
+ }
+ if (close(fid) < 0)
+ return errno;
for (stored = 4; stored <= 8; stored *= 2) {
int_fast32_t ttisstdcnt = detzcode(up->tzhead.tzh_ttisstdcnt);
int_fast32_t ttisgmtcnt = detzcode(up->tzhead.tzh_ttisgmtcnt);
@@ -383,23 +394,24 @@ tzload(register const char *name, register struct state *const sp,
int_fast32_t timecnt = detzcode(up->tzhead.tzh_timecnt);
int_fast32_t typecnt = detzcode(up->tzhead.tzh_typecnt);
int_fast32_t charcnt = detzcode(up->tzhead.tzh_charcnt);
- p = up->tzhead.tzh_charcnt + sizeof up->tzhead.tzh_charcnt;
+ char const *p = up->buf + tzheadsize;
if (! (0 <= leapcnt && leapcnt < TZ_MAX_LEAPS
&& 0 < typecnt && typecnt < TZ_MAX_TYPES
&& 0 <= timecnt && timecnt < TZ_MAX_TIMES
&& 0 <= charcnt && charcnt < TZ_MAX_CHARS
&& (ttisstdcnt == typecnt || ttisstdcnt == 0)
&& (ttisgmtcnt == typecnt || ttisgmtcnt == 0)))
- goto oops;
- if (nread - (p - up->buf)
- < (timecnt * stored /* ats */
+ return EINVAL;
+ if (nread
+ < (tzheadsize /* struct tzhead */
+ + timecnt * stored /* ats */
+ timecnt /* types */
+ typecnt * 6 /* ttinfos */
+ charcnt /* chars */
+ leapcnt * (stored + 4) /* lsinfos */
+ ttisstdcnt /* ttisstds */
+ ttisgmtcnt)) /* ttisgmts */
- goto oops;
+ return EINVAL;
sp->leapcnt = leapcnt;
sp->timecnt = timecnt;
sp->typecnt = typecnt;
@@ -419,7 +431,7 @@ tzload(register const char *name, register struct state *const sp,
? time_t_min : at);
if (timecnt && attime <= sp->ats[timecnt - 1]) {
if (attime < sp->ats[timecnt - 1])
- goto oops;
+ return EINVAL;
sp->types[i - 1] = 0;
timecnt--;
}
@@ -432,7 +444,7 @@ tzload(register const char *name, register struct state *const sp,
for (i = 0; i < sp->timecnt; ++i) {
unsigned char typ = *p++;
if (sp->typecnt <= typ)
- goto oops;
+ return EINVAL;
if (sp->types[i])
sp->types[timecnt++] = typ;
}
@@ -446,11 +458,11 @@ tzload(register const char *name, register struct state *const sp,
p += 4;
isdst = *p++;
if (! (isdst < 2))
- goto oops;
+ return EINVAL;
ttisp->tt_isdst = isdst;
abbrind = *p++;
if (! (abbrind < sp->charcnt))
- goto oops;
+ return EINVAL;
ttisp->tt_abbrind = abbrind;
}
for (i = 0; i < sp->charcnt; ++i)
@@ -469,7 +481,7 @@ tzload(register const char *name, register struct state *const sp,
? time_t_min : tr);
if (leapcnt && trans <= sp->lsis[leapcnt - 1].ls_trans) {
if (trans < sp->lsis[leapcnt - 1].ls_trans)
- goto oops;
+ return EINVAL;
leapcnt--;
}
sp->lsis[leapcnt].ls_trans = trans;
@@ -487,7 +499,7 @@ tzload(register const char *name, register struct state *const sp,
ttisp->tt_ttisstd = false;
else {
if (*p != true && *p != false)
- goto oops;
+ return EINVAL;
ttisp->tt_ttisstd = *p++;
}
}
@@ -499,7 +511,7 @@ tzload(register const char *name, register struct state *const sp,
ttisp->tt_ttisgmt = false;
else {
if (*p != true && *p != false)
- goto oops;
+ return EINVAL;
ttisp->tt_ttisgmt = *p++;
}
}
@@ -509,8 +521,7 @@ tzload(register const char *name, register struct state *const sp,
if (up->tzhead.tzh_version[0] == '\0')
break;
nread -= p - up->buf;
- for (i = 0; i < nread; ++i)
- up->buf[i] = p[i];
+ memmove(up->buf, p, nread);
/*
** If this is a signed narrow time_t system, we're done.
*/
@@ -571,10 +582,10 @@ tzload(register const char *name, register struct state *const sp,
** If type 0 is is unused in transitions,
** it's the type to use for early times.
*/
- for (i = 0; i < sp->typecnt; ++i)
+ for (i = 0; i < sp->timecnt; ++i)
if (sp->types[i] == 0)
break;
- i = (i >= sp->typecnt) ? 0 : -1;
+ i = i < sp->timecnt ? -1 : 0;
/*
** Absent the above,
** if there are transition times
@@ -601,15 +612,27 @@ tzload(register const char *name, register struct state *const sp,
}
}
sp->defaulttype = i;
+ return 0;
+}
+
+/* Load tz data from the file named NAME into *SP. Read extended
+ format if DOEXTEND. Return 0 on success, an errno value on failure. */
+static int
+tzload(char const *name, struct state *sp, bool doextend)
+{
#ifdef ALL_STATE
- free(up);
-#endif /* defined ALL_STATE */
- return true;
-oops:
-#ifdef ALL_STATE
- free(up);
-#endif /* defined ALL_STATE */
- return false;
+ union local_storage *lsp = malloc(sizeof *lsp);
+ if (!lsp)
+ return errno;
+ else {
+ int err = tzloadbody(name, sp, doextend, lsp);
+ free(lsp);
+ return err;
+ }
+#else
+ union local_storage ls;
+ return tzloadbody(name, sp, doextend, &ls);
+#endif
}
static bool
@@ -934,7 +957,6 @@ tzparse(const char *name, register struct state *const sp,
int_fast32_t dstoffset;
register char * cp;
register bool load_ok;
- static struct ttinfo zttinfo;
stdname = name;
if (lastditch) {
@@ -962,7 +984,7 @@ tzparse(const char *name, register struct state *const sp,
if (name == NULL)
return false;
}
- load_ok = tzload(TZDEFRULES, sp, false);
+ load_ok = tzload(TZDEFRULES, sp, false) == 0;
if (!load_ok)
sp->leapcnt = 0; /* so, we're off a little */
if (*name != '\0') {
@@ -1006,13 +1028,8 @@ tzparse(const char *name, register struct state *const sp,
/*
** Two transitions per year, from EPOCH_YEAR forward.
*/
- sp->ttis[0] = sp->ttis[1] = zttinfo;
- sp->ttis[0].tt_gmtoff = -dstoffset;
- sp->ttis[0].tt_isdst = true;
- sp->ttis[0].tt_abbrind = stdlen + 1;
- sp->ttis[1].tt_gmtoff = -stdoffset;
- sp->ttis[1].tt_isdst = false;
- sp->ttis[1].tt_abbrind = 0;
+ init_ttinfo(&sp->ttis[0], -dstoffset, true, stdlen + 1);
+ init_ttinfo(&sp->ttis[1], -stdoffset, false, 0);
sp->defaulttype = 0;
timecnt = 0;
janfirst = 0;
@@ -1131,13 +1148,8 @@ tzparse(const char *name, register struct state *const sp,
/*
** Finally, fill in ttis.
*/
- sp->ttis[0] = sp->ttis[1] = zttinfo;
- sp->ttis[0].tt_gmtoff = -stdoffset;
- sp->ttis[0].tt_isdst = false;
- sp->ttis[0].tt_abbrind = 0;
- sp->ttis[1].tt_gmtoff = -dstoffset;
- sp->ttis[1].tt_isdst = true;
- sp->ttis[1].tt_abbrind = stdlen + 1;
+ init_ttinfo(&sp->ttis[0], -stdoffset, false, 0);
+ init_ttinfo(&sp->ttis[1], -dstoffset, true, stdlen + 1);
sp->typecnt = 2;
sp->defaulttype = 0;
}
@@ -1145,10 +1157,7 @@ tzparse(const char *name, register struct state *const sp,
dstlen = 0;
sp->typecnt = 1; /* only standard time */
sp->timecnt = 0;
- sp->ttis[0] = zttinfo;
- sp->ttis[0].tt_gmtoff = -stdoffset;
- sp->ttis[0].tt_isdst = false;
- sp->ttis[0].tt_abbrind = 0;
+ init_ttinfo(&sp->ttis[0], -stdoffset, false, 0);
sp->defaulttype = 0;
}
sp->charcnt = stdlen + 1;
@@ -1170,47 +1179,55 @@ tzparse(const char *name, register struct state *const sp,
static void
gmtload(struct state *const sp)
{
- if (! tzload(gmt, sp, true))
+ if (tzload(gmt, sp, true) != 0)
tzparse(gmt, sp, true);
}
-static struct state *
+/* Initialize *SP to a value appropriate for the TZ setting NAME.
+ Return 0 on success, an errno value on failure. */
+static int
zoneinit(struct state *sp, char const *name)
{
- if (sp) {
- if (name && ! name[0]) {
- /*
- ** User wants it fast rather than right.
- */
- sp->leapcnt = 0; /* so, we're off a little */
- sp->timecnt = 0;
- sp->typecnt = 0;
- sp->ttis[0].tt_isdst = 0;
- sp->ttis[0].tt_gmtoff = 0;
- sp->ttis[0].tt_abbrind = 0;
- strcpy(sp->chars, gmt);
- } else if (! (tzload(name, sp, true)
- || (name && name[0] != ':' && tzparse(name, sp, false))))
- return NULL;
+ if (name && ! name[0]) {
+ /*
+ ** User wants it fast rather than right.
+ */
+ sp->leapcnt = 0; /* so, we're off a little */
+ sp->timecnt = 0;
+ sp->typecnt = 0;
+ sp->charcnt = 0;
+ sp->goback = sp->goahead = false;
+ init_ttinfo(&sp->ttis[0], 0, false, 0);
+ strcpy(sp->chars, gmt);
+ sp->defaulttype = 0;
+ return 0;
+ } else {
+ int err = tzload(name, sp, true);
+ if (err != 0 && name && name[0] != ':' && tzparse(name, sp, false))
+ return 0;
+ return err;
}
- return sp;
}
static void
tzsetlcl(char const *name)
{
+ struct state *sp = lclptr;
int lcl = name ? strlen(name) < sizeof lcl_TZname : -1;
if (lcl < 0
? lcl_is_set < 0
: 0 < lcl_is_set && strcmp(lcl_TZname, name) == 0)
return;
- if (0 < lcl)
- strcpy(lcl_TZname, name);
#ifdef ALL_STATE
- if (! lclptr)
- lclptr = malloc(sizeof *lclptr);
+ if (! sp)
+ lclptr = sp = malloc(sizeof *lclptr);
#endif /* defined ALL_STATE */
- zoneinit(lclptr, name);
+ if (sp) {
+ if (zoneinit(sp, name) != 0)
+ zoneinit(sp, "");
+ if (0 < lcl)
+ strcpy(lcl_TZname, name);
+ }
settzname();
lcl_is_set = lcl;
}
@@ -1244,17 +1261,17 @@ tzset(void)
static void
gmtcheck(void)
{
- static bool VOLATILE gmt_is_set;
- if (gmt_is_set)
- return;
+ static bool gmt_is_set;
if (lock() != 0)
return;
+ if (! gmt_is_set) {
#ifdef ALL_STATE
- gmtptr = malloc(sizeof *gmtptr);
+ gmtptr = malloc(sizeof *gmtptr);
#endif
- if (gmtptr)
- gmtload(gmtptr);
- gmt_is_set = true;
+ if (gmtptr)
+ gmtload(gmtptr);
+ gmt_is_set = true;
+ }
unlock();
}
@@ -1264,10 +1281,15 @@ timezone_t
tzalloc(char const *name)
{
timezone_t sp = malloc(sizeof *sp);
- timezone_t tp = sp ? zoneinit(sp, name) : sp;
- if (!tp)
- free(sp);
- return tp;
+ if (sp) {
+ int err = zoneinit(sp, name);
+ if (err != 0) {
+ free(sp);
+ errno = err;
+ return NULL;
+ }
+ }
+ return sp;
}
void
@@ -1294,7 +1316,11 @@ tzfree(timezone_t sp)
** freely called. (And no, the PANS doesn't require the above behavior,
** but it *is* desirable.)
**
-** The unused offset argument is for the benefit of mktime variants.
+** If successful and OFFSET is nonzero,
+** set the applicable parts of tzname, timezone and altzone;
+** however, it's OK to omit this step if the time zone is POSIX-compatible,
+** since in that case tzset should have already done this step correctly.
+** OFFSET's type is intfast32_t for compatibility with gmtsub.
*/
/*ARGSUSED*/
@@ -1307,8 +1333,10 @@ localsub(struct state const *sp, time_t const *timep, int_fast32_t offset,
register struct tm * result;
const time_t t = *timep;
- if (sp == NULL)
- return gmtsub(gmtptr, timep, offset, tmp);
+ if (sp == NULL) {
+ /* Don't bother to set tzname etc.; tzset has already done it. */
+ return gmtsub(gmtptr, timep, 0, tmp);
+ }
if ((sp->goback && t < sp->ats[0]) ||
(sp->goahead && t > sp->ats[sp->timecnt - 1])) {
time_t newt = t;
@@ -1328,16 +1356,16 @@ localsub(struct state const *sp, time_t const *timep, int_fast32_t offset,
newt > sp->ats[sp->timecnt - 1])
return NULL; /* "cannot happen" */
result = localsub(sp, &newt, offset, tmp);
- if (result == tmp) {
+ if (result) {
register int_fast64_t newy;
- newy = tmp->tm_year;
+ newy = result->tm_year;
if (t < sp->ats[0])
newy -= years;
else newy += years;
if (! (INT_MIN <= newy && newy <= INT_MAX))
return NULL;
- tmp->tm_year = newy;
+ result->tm_year = newy;
}
return result;
}
@@ -1364,30 +1392,52 @@ localsub(struct state const *sp, time_t const *timep, int_fast32_t offset,
** timesub(&t, 0L, sp, tmp);
*/
result = timesub(&t, ttisp->tt_gmtoff, sp, tmp);
- tmp->tm_isdst = ttisp->tt_isdst;
+ if (result) {
+ bool tm_isdst = ttisp->tt_isdst;
+ char *tm_zone = (char *) &sp->chars[ttisp->tt_abbrind];
+ result->tm_isdst = tm_isdst;
#ifdef TM_ZONE
- tmp->TM_ZONE = (char *) &sp->chars[ttisp->tt_abbrind];
+ result->TM_ZONE = tm_zone;
#endif /* defined TM_ZONE */
+ if (offset) {
+ /* Always set the tzname etc. vars whose values can easily
+ be determined, as it's too much trouble to tell whether
+ tzset has already done it correctly. */
+ tzname[tm_isdst] = tm_zone;
+#ifdef USG_COMPAT
+ if (!tm_isdst)
+ timezone = - ttisp->tt_gmtoff;
+#endif
+#ifdef ALTZONE
+ if (tm_isdst)
+ altzone = - ttisp->tt_gmtoff;
+#endif
+ }
+ }
return result;
}
-NETBSD_INSPIRED_EXTERN struct tm *
+#if NETBSD_INSPIRED
+
+struct tm *
localtime_rz(struct state *sp, time_t const *timep, struct tm *tmp)
{
return localsub(sp, timep, 0, tmp);
}
+#endif
+
static struct tm *
-localtime_tzset(time_t const *timep, struct tm *tmp, bool skip_tzset)
+localtime_tzset(time_t const *timep, struct tm *tmp, bool setname)
{
int err = lock();
if (err) {
errno = err;
return NULL;
}
- if (!skip_tzset)
+ if (setname || !lcl_is_set)
tzset_unlocked();
- tmp = localtime_rz(lclptr, timep, tmp);
+ tmp = localsub(lclptr, timep, setname, tmp);
unlock();
return tmp;
}
@@ -1395,13 +1445,13 @@ localtime_tzset(time_t const *timep, struct tm *tmp, bool skip_tzset)
struct tm *
localtime(const time_t *const timep)
{
- return localtime_tzset(timep, &tm, 0);
+ return localtime_tzset(timep, &tm, true);
}
struct tm *
localtime_r(const time_t *const timep, struct tm *tmp)
{
- return localtime_tzset(timep, tmp, lcl_is_set != 0);
+ return localtime_tzset(timep, tmp, false);
}
/*
@@ -1441,8 +1491,7 @@ struct tm *
gmtime_r(const time_t *const timep, struct tm *tmp)
{
gmtcheck();
- tmp = gmtsub(gmtptr, timep, 0, tmp);
- return tmp;
+ return gmtsub(gmtptr, timep, 0, tmp);
}
#ifdef STD_INSPIRED
@@ -1450,10 +1499,8 @@ gmtime_r(const time_t *const timep, struct tm *tmp)
struct tm *
offtime(const time_t *const timep, const long offset)
{
- struct tm *tmp;
gmtcheck();
- tmp = gmtsub(gmtptr, timep, offset, &tm);
- return tmp;
+ return gmtsub(gmtptr, timep, offset, &tm);
}
#endif /* defined STD_INSPIRED */
@@ -1520,13 +1567,13 @@ timesub(const time_t *const timep, const int_fast32_t offset,
tdelta = tdays / DAYSPERLYEAR;
if (! ((! TYPE_SIGNED(time_t) || INT_MIN <= tdelta)
&& tdelta <= INT_MAX))
- return NULL;
+ goto out_of_range;
idelta = tdelta;
if (idelta == 0)
idelta = (tdays < 0) ? -1 : 1;
newy = y;
if (increment_overflow(&newy, idelta))
- return NULL;
+ goto out_of_range;
leapdays = leaps_thru_end_of(newy - 1) -
leaps_thru_end_of(y - 1);
tdays -= ((time_t) newy - y) * DAYSPERNYEAR;
@@ -1555,17 +1602,17 @@ timesub(const time_t *const timep, const int_fast32_t offset,
}
while (idays < 0) {
if (increment_overflow(&y, -1))
- return NULL;
+ goto out_of_range;
idays += year_lengths[isleap(y)];
}
while (idays >= year_lengths[isleap(y)]) {
idays -= year_lengths[isleap(y)];
if (increment_overflow(&y, 1))
- return NULL;
+ goto out_of_range;
}
tmp->tm_year = y;
if (increment_overflow(&tmp->tm_year, -TM_YEAR_BASE))
- return NULL;
+ goto out_of_range;
tmp->tm_yday = idays;
/*
** The "extra" mods below avoid overflow problems.
@@ -1596,6 +1643,10 @@ timesub(const time_t *const timep, const int_fast32_t offset,
tmp->TM_GMTOFF = offset;
#endif /* defined TM_GMTOFF */
return tmp;
+
+ out_of_range:
+ errno = EOVERFLOW;
+ return NULL;
}
char *
@@ -1607,15 +1658,16 @@ ctime(const time_t *const timep)
** to local time in the form of a string. It is equivalent to
** asctime(localtime(timer))
*/
- return asctime(localtime(timep));
+ struct tm *tmp = localtime(timep);
+ return tmp ? asctime(tmp) : NULL;
}
char *
ctime_r(const time_t *const timep, char *buf)
{
- struct tm mytm;
-
- return asctime_r(localtime_r(timep, &mytm), buf);
+ struct tm mytm;
+ struct tm *tmp = localtime_r(timep, &mytm);
+ return tmp ? asctime_r(tmp, buf) : NULL;
}
/*
@@ -2015,17 +2067,27 @@ time1(struct tm *const tmp,
return WRONG;
}
-NETBSD_INSPIRED_EXTERN time_t
-mktime_z(struct state *sp, struct tm *tmp)
+static time_t
+mktime_tzname(struct state *sp, struct tm *tmp, bool setname)
{
if (sp)
- return time1(tmp, localsub, sp, 0);
+ return time1(tmp, localsub, sp, setname);
else {
gmtcheck();
return time1(tmp, gmtsub, gmtptr, 0);
}
}
+#if NETBSD_INSPIRED
+
+time_t
+mktime_z(struct state *sp, struct tm *tmp)
+{
+ return mktime_tzname(sp, tmp, false);
+}
+
+#endif
+
time_t
mktime(struct tm *const tmp)
{
@@ -2036,7 +2098,7 @@ mktime(struct tm *const tmp)
return -1;
}
tzset_unlocked();
- t = mktime_z(lclptr, tmp);
+ t = mktime_tzname(lclptr, tmp, true);
unlock();
return t;
}
@@ -2060,12 +2122,10 @@ timegm(struct tm *const tmp)
time_t
timeoff(struct tm *const tmp, const long offset)
{
- time_t t;
if (tmp)
tmp->tm_isdst = 0;
gmtcheck();
- t = time1(tmp, gmtsub, gmtptr, offset);
- return t;
+ return time1(tmp, gmtsub, gmtptr, offset);
}
#endif /* defined STD_INSPIRED */
@@ -2090,7 +2150,6 @@ leapcorr(struct state const *sp, time_t t)
register struct lsinfo const * lp;
register int i;
- sp = lclptr;
i = sp->leapcnt;
while (--i >= 0) {
lp = &sp->lsis[i];
diff --git a/elsie.nci.nih.gov/src/newtzset.3 b/elsie.nci.nih.gov/src/newtzset.3
index 68905a5..62277f7 100644
--- a/elsie.nci.nih.gov/src/newtzset.3
+++ b/elsie.nci.nih.gov/src/newtzset.3
@@ -251,10 +251,9 @@ extensions to POSIX.
stands for US Eastern Standard
Time (EST), 5 hours behind UTC, without daylight saving.
.TP
-.B FJT\*-12FJST,M10.3.1/146,M1.3.4/75
+.B FJT\*-12FJST,M11.1.0,M1.3.4/75
stands for Fiji Time (FJT) and Fiji Summer Time (FJST), 12 hours ahead
-of UTC, springing forward on October's third Monday at
-146:00 (i.e., 02:00 on the first Sunday on or after October 21), and
+of UTC, springing forward on November's first Sunday at 02:00, and
falling back on January's third Thursday at 75:00 (i.e., 03:00 on the
first Sunday on or after January 18).
.TP
diff --git a/elsie.nci.nih.gov/src/newtzset.3.txt b/elsie.nci.nih.gov/src/newtzset.3.txt
index 034d896..4df0e4a 100644
--- a/elsie.nci.nih.gov/src/newtzset.3.txt
+++ b/elsie.nci.nih.gov/src/newtzset.3.txt
@@ -140,12 +140,11 @@ DESCRIPTION
EST5 stands for US Eastern Standard Time (EST), 5 hours behind UTC,
without daylight saving.
- FJT-12FJST,M10.3.1/146,M1.3.4/75
+ FJT-12FJST,M11.1.0,M1.3.4/75
stands for Fiji Time (FJT) and Fiji Summer Time (FJST), 12 hours
- ahead of UTC, springing forward on October's third Monday at
- 146:00 (i.e., 02:00 on the first Sunday on or after October 21),
- and falling back on January's third Thursday at 75:00 (i.e.,
- 03:00 on the first Sunday on or after January 18).
+ ahead of UTC, springing forward on November's first Sunday at
+ 02:00, and falling back on January's third Thursday at 75:00
+ (i.e., 03:00 on the first Sunday on or after January 18).
IST-2IDT,M3.4.4/26,M10.5.0
stands for Israel Standard Time (IST) and Israel Daylight Time
diff --git a/elsie.nci.nih.gov/src/northamerica b/elsie.nci.nih.gov/src/northamerica
index ebfe5e3..07f527f 100644
--- a/elsie.nci.nih.gov/src/northamerica
+++ b/elsie.nci.nih.gov/src/northamerica
@@ -277,6 +277,12 @@ Zone PST8PDT -8:00 US P%sT
# time zone, but we do go by the Eastern time zone because so many people work
# in Columbus."
+# From Paul Eggert (2014-09-06):
+# Monthly Notices of the Royal Astronomical Society 44, 4 (1884-02-08), 208
+# says that New York City Hall time was 3 minutes 58.4 seconds fast of
+# Eastern time (i.e., -4:56:01.6) just before the 1883 switch. Round to the
+# nearest second.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule NYC 1920 only - Mar lastSun 2:00 1:00 D
Rule NYC 1920 only - Oct lastSun 2:00 0 S
@@ -1095,17 +1101,16 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
# An amendment to the Interpretation Act was registered on February 19/2007....
# http://action.attavik.ca/home/justice-gn/attach/2007/gaz02part2.pdf
-# From Paul Eggert (2006-04-25):
+# From Paul Eggert (2014-10-18):
# H. David Matthews and Mary Vincent's map
# "It's about TIME", _Canadian Geographic_ (September-October 1998)
-# http://www.canadiangeographic.ca/Magazine/SO98/geomap.asp
+# http://www.canadiangeographic.ca/Magazine/SO98/alacarte.asp
# contains detailed boundaries for regions observing nonstandard
# time and daylight saving time arrangements in Canada circa 1998.
#
-# INMS, the Institute for National Measurement Standards in Ottawa, has
-# information about standard and daylight saving time zones in Canada.
-# http://inms-ienm.nrc-cnrc.gc.ca/en/time_services/daylight_saving_e.php
-# (updated periodically).
+# National Research Council Canada maintains info about time zones and DST.
+# http://www.nrc-cnrc.gc.ca/eng/services/time/time_zones.html
+# http://www.nrc-cnrc.gc.ca/eng/services/time/faq/index.html#Q5
# Its unofficial information is often taken from Matthews and Vincent.
# From Paul Eggert (2006-06-27):
@@ -1970,10 +1975,7 @@ Zone America/Creston -7:46:04 - LMT 1884
# [Also see <http://www.nunatsiaq.com/nunavut/nvt10309_06.html> (2001-03-09).]
# From Gwillim Law (2005-05-21):
-# According to maps at
-# http://inms-ienm.nrc-cnrc.gc.ca/images/time_services/TZ01SWE.jpg
-# http://inms-ienm.nrc-cnrc.gc.ca/images/time_services/TZ01SSE.jpg
-# (both dated 2003), and
+# According to ...
# http://www.canadiangeographic.ca/Magazine/SO98/geomap.asp
# (from a 1998 Canadian Geographic article), the de facto and de jure time
# for Southampton Island (at the north end of Hudson Bay) is UTC-5 all year
@@ -1982,9 +1984,11 @@ Zone America/Creston -7:46:04 - LMT 1884
# predates the creation of Nunavut, it probably goes back many years....
# The Inuktitut name of Coral Harbour is Sallit, but it's rarely used.
#
-# From Paul Eggert (2005-07-26):
+# From Paul Eggert (2014-10-17):
# For lack of better information, assume that Southampton Island observed
-# daylight saving only during wartime.
+# daylight saving only during wartime. Gwillim Law's email also
+# mentioned maps now maintained by National Research Council Canada;
+# see above for an up-to-date link.
# From Chris Walton (2007-03-01):
# ... the community of Resolute (located on Cornwallis Island in
@@ -2985,10 +2989,21 @@ Zone America/Tegucigalpa -5:48:52 - LMT 1921 Apr
# Shanks & Pottenger give -5:07:12, but Milne records -5:07:10.41 from an
# unspecified official document, and says "This time is used throughout the
# island". Go with Milne. Round to the nearest second as required by zic.
+#
+# Shanks & Pottenger give April 28 for the 1974 spring-forward transition, but
+# Lance Neita writes that Prime Minister Michael Manley decreed it January 5.
+# Assume Neita meant Jan 6 02:00, the same as the US. Neita also writes that
+# Manley's supporters associated this act with Manley's nickname "Joshua"
+# (recall that in the Bible the sun stood still at Joshua's request),
+# and with the Rod of Correction which Manley said he had received from
+# Haile Selassie, Emperor of Ethiopia. See:
+# Neita L. The politician in all of us. Jamaica Observer 2014-09-20
+# http://www.jamaicaobserver.com/columns/The-politician-in-all-of-us_17573647
+#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Jamaica -5:07:11 - LMT 1890 # Kingston
-5:07:11 - KMT 1912 Feb # Kingston Mean Time
- -5:00 - EST 1974 Apr 28 2:00
+ -5:00 - EST 1974
-5:00 US E%sT 1984
-5:00 - EST
diff --git a/elsie.nci.nih.gov/src/private.h b/elsie.nci.nih.gov/src/private.h
index e7f5255..efa1bdf 100644
--- a/elsie.nci.nih.gov/src/private.h
+++ b/elsie.nci.nih.gov/src/private.h
@@ -101,11 +101,19 @@
#include "sys/types.h" /* for time_t */
#include "stdio.h"
-#include "errno.h"
#include "string.h"
#include "limits.h" /* for CHAR_BIT et al. */
#include "stdlib.h"
+#include "errno.h"
+
+#ifndef ENAMETOOLONG
+# define ENAMETOOLONG EINVAL
+#endif
+#ifndef EOVERFLOW
+# define EOVERFLOW EINVAL
+#endif
+
#if HAVE_GETTEXT
#include "libintl.h"
#endif /* HAVE_GETTEXT */
diff --git a/elsie.nci.nih.gov/src/tz-art.htm b/elsie.nci.nih.gov/src/tz-art.htm
index ef06675..fddcf81 100644
--- a/elsie.nci.nih.gov/src/tz-art.htm
+++ b/elsie.nci.nih.gov/src/tz-art.htm
@@ -216,7 +216,7 @@ Supernaw.</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td>Artist</td><td>Bob Dylan</td></tr>
-<tr><td>CD</td><td>The Time They Are A-Changin'</td></tr>
+<tr><td>CD</td><td>The Times They Are a-Changin'</td></tr>
<tr><td>Copyright Date</td><td>1964</td></tr>
<tr><td>Label</td><td>Columbia</td></tr>
<tr><td>ID</td><td>CK-8905</td></tr>
@@ -291,6 +291,14 @@ An on-line English-language translation of the book is available at
<a href="http://www.literature.org/Works/Jules-Verne/eighty">http://www.literature.org/Works/Jules-Verne/eighty</a></td></tr>
<tr><td>&nbsp;</td></tr>
+<tr><td>Artist</td><td>Nick Enright</td></tr>
+<tr><td>Play</td><td><em>Daylight Saving</em></td></tr>
+<tr><td>Copyright Date</td><td>1989</td></tr>
+<tr><td>Notes</td><td>
+A fast-paced comedy about love and loneliness as the clocks turn back.
+</td></tr>
+
+<tr><td>&nbsp;</td></tr>
<tr><td>Artist</td><td>Umberto Eco</td></tr>
<tr><td>Book</td><td><em>The Island of the Day Before</em>
(<em>L'isola del giorno prima</em>)</td></tr>
@@ -488,7 +496,7 @@ Peppermint Patty: "What if the world comes to an end tonight, Marcie?"
Marcie: "I promise there'll be a tomorrow, sir ... in fact,
it's already tomorrow in Australia!"
<br>
-(Charles M. Schultz, <em>Peanuts</em>, 1980-06-13)
+(Charles M. Schulz, <em>Peanuts</em>, 1980-06-13)
</li>
<li>
"I put myself and my staff through this crazy, huge ordeal, all because
diff --git a/elsie.nci.nih.gov/src/tz-link.htm b/elsie.nci.nih.gov/src/tz-link.htm
index f72a3a4..98594f4 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="2014-08-26">
+<meta name="DC.Date" content="2014-10-21">
<meta name="DC.Description"
content="Sources of information about time zones and daylight saving time">
<meta name="DC.Identifier"
@@ -429,7 +429,7 @@ time zone history atlases published in both <a
href="http://astrocom.com/astrology-products/software/acs-atlas-software">computer</a>
and book form (<a
href="http://www.astrocom.com/astrology/books/american-atlas">one volume
-for the U.S.</a>, and <a
+for the <abbr>US</abbr></a>, and <a
href="http://www.astrocom.com/astrology/books/international-atlas">one for
other locations</a>) by <a
href="http://astrocom.com/">Astro Computing Services</a>.</li>
@@ -496,10 +496,6 @@ href="http://manifold.net/info/freestuff.shtml">Free Stuff for
Manifold System Users</a> includes a Manifold-format map of
world time zone boundaries distributed under the
<abbr>GPL</abbr>.</li>
-<li>The <abbr>US</abbr> Geological Survey's National Atlas of
-the United States
-publishes the <a href="http://nationalatlas.gov/mld/timeznp.html">Time
-Zones of the United States</a> in the public domain.</li>
<li>The GeoCommunity lists several commercial sources for <a
href="http://spatialnews.geocomm.com/features/timezones/">International
Time Zones and Time Zone Data</a>.</li>
@@ -519,7 +515,7 @@ common.</li>
<li><a href="http://www.nist.gov/pml/general/time/index.cfm">A
Walk through Time</a>
surveys the evolution of timekeeping.</li>
-<li><a href="http://webexhibits.org/daylightsaving/">About Daylight
+<li><a href="http://www.webexhibits.org/daylightsaving/">About Daylight
Saving Time &ndash; History, rationale, laws &amp; dates</a>
is an overall history of <abbr>DST</abbr>.</li>
<li><a href="http://www.w3.org/TR/timezone/">Working with Time Zones</a>
@@ -544,9 +540,9 @@ Zone Concepts</a> discusses terminological issues behind time zones.</li>
<h2>National histories of legal time</h2>
<dl>
<dt>Australia</dt>
-<dd>The Parliamentary Library has commissioned <a
-href="http://www.aph.gov.au/binaries/library/pubs/rn/2006-07/07rn13.pdf">research
-note on daylight saving time in Australia</a>.
+<dd>The Parliamentary Library has commissioned a <a
+href="http://www.aph.gov.au/binaries/library/pubs/rp/2009-10/10rp10.pdf">research
+paper on daylight saving time in Australia</a>.
The Bureau of Meteorology publishes a list of <a
href="http://www.bom.gov.au/climate/averages/tables/dst_times.shtml">Implementation
Dates of Daylight Savings Time within Australia</a>.</dd>
@@ -565,8 +561,8 @@ and some older information about <a
href="http://www.nrc-cnrc.gc.ca/eng/services/time/time_zones.html">time
zones &amp; daylight saving time</a>.</dd>
<dt>Chile</dt>
-<dd>The Chilean Hydrographic and Oceanographic Service publishes a <a
-href="http://www.horaoficial.cl/historia_hora.html" hreflang="es">history of
+<dd>The Hydrographic and Oceanographic Service of the Chilean Navy publishes a
+<a href="http://www.horaoficial.cl/historia_hora.html" hreflang="es">history of
Chile's official time (in Spanish)</a>.</dd>
<dt>Germany</dt>
<dd>The National Institute for Science and Technology maintains the <a
@@ -579,7 +575,7 @@ hreflang="he">announcements (in Hebrew)</a>.</dd>
<dt>Mexico</dt>
<dd>The Investigation and Analysis Service of the Mexican Library of
Congress has published a <a
-href="http://www.diputados.gob.mx/bibliot/publica/inveyana/polisoc/horver/"
+href="http://www.diputados.gob.mx/bibliot/publica/inveyana/polisoc/horver/index.htm"
hreflang="es">history of Mexican local time (in Spanish)</a>.</dd>
<dt>Malaysia</dt>
<dd>See Singapore below.</dd>
@@ -744,8 +740,8 @@ database contains English abbreviations for all time stamps but in
many cases these are merely inventions of the database
maintainers.</li>
<li>Numeric time zone abbreviations typically count hours east of
-<abbr>UTC</abbr>, e.g., <code>+09</code> for Japan and
-<code>-10</code> for Hawaii. However, the <abbr>POSIX</abbr>
+<abbr>UTC</abbr>, e.g., +09 for Japan and
+&minus;10 for Hawaii. However, the <abbr>POSIX</abbr>
<code><abbr>TZ</abbr></code> environment variable uses the opposite convention.
For example, one might use <code><abbr>TZ</abbr>="<abbr
title="Japan Standard Time">JST</abbr>-9"</code> and
diff --git a/elsie.nci.nih.gov/src/zdump.8 b/elsie.nci.nih.gov/src/zdump.8
index 94de021..db73f49 100644
--- a/elsie.nci.nih.gov/src/zdump.8
+++ b/elsie.nci.nih.gov/src/zdump.8
@@ -30,12 +30,19 @@ the time one day after the lowest possible time value,
the times both one second before and exactly at
each detected time discontinuity,
the time at one day less than the highest possible time value,
-and the time at the highest possible time value,
-Each line ends with
-.B isdst=1
-if the given time is Daylight Saving Time or
-.B isdst=0
-otherwise.
+and the time at the highest possible time value.
+Each line is followed by
+.BI isdst= D
+where
+.I D
+is positive, zero, or negative depending on whether
+the given time is daylight saving time, standard time,
+or an unknown time type, respectively.
+Each line is also followed by
+.BI gmtoff= N
+if the given local time is known to be
+.I N
+seconds east of Greenwich.
.TP
.B \*-V
Like
@@ -45,14 +52,27 @@ This generates output that is easier to compare to that of
implementations with different time representations.
.TP
.BI "\*-c " [loyear,]hiyear
-Cut off verbose output near the start of the given year(s).
-By default,
-the program cuts off verbose output near the starts of the years
-\-500 and 2500.
+Cut off verbose output at the given year(s).
+Cutoff times are computed using the proleptic Gregorian calendar with year 0
+and with Universal Time (UT) ignoring leap seconds.
+The lower bound is exclusive and the upper is inclusive; for example, a
+.I loyear
+of 1970 excludes a transition occurring at 1970-01-01 00:00:00 UTC but a
+.I hiyear
+of 1970 includes the transition.
+The default cutoff is
+.BR \*-500,2500 .
.TP
.BI "\*-t " [lotime,]hitime
-Cut off verbose output at the start of the given time(s),
-given in decimal seconds since 1970-01-01 00:00:00 UTC.
+Cut off verbose output at the given time(s),
+given in decimal seconds since 1970-01-01 00:00:00
+Coordinated Universal Time (UTC).
+The
+.I zonename
+determines whether the count includes leap seconds.
+As with
+.BR \*-c ,
+the cutoff's lower bound is exclusive and its upper bound is inclusive.
.SH LIMITATIONS
Time discontinuities are found by sampling the results returned by localtime
at twelve-hour intervals.
diff --git a/elsie.nci.nih.gov/src/zdump.8.txt b/elsie.nci.nih.gov/src/zdump.8.txt
index ccae319..df8d1fd 100644
--- a/elsie.nci.nih.gov/src/zdump.8.txt
+++ b/elsie.nci.nih.gov/src/zdump.8.txt
@@ -20,21 +20,32 @@ DESCRIPTION
possible time value, the times both one second before and
exactly at each detected time discontinuity, the time at one day
less than the highest possible time value, and the time at the
- highest possible time value, Each line ends with isdst=1 if the
- given time is Daylight Saving Time or isdst=0 otherwise.
+ highest possible time value. Each line is followed by isdst=D
+ where D is positive, zero, or negative depending on whether the
+ given time is daylight saving time, standard time, or an unknown
+ time type, respectively. Each line is also followed by gmtoff=N
+ if the given local time is known to be N seconds east of
+ Greenwich.
-V Like -v, except omit the times relative to the extreme time
values. This generates output that is easier to compare to that
of implementations with different time representations.
-c [loyear,]hiyear
- Cut off verbose output near the start of the given year(s). By
- default, the program cuts off verbose output near the starts of
- the years -500 and 2500.
+ Cut off verbose output at the given year(s). Cutoff times are
+ computed using the proleptic Gregorian calendar with year 0 and
+ with Universal Time (UT) ignoring leap seconds. The lower bound
+ is exclusive and the upper is inclusive; for example, a loyear
+ of 1970 excludes a transition occurring at 1970-01-01 00:00:00
+ UTC but a hiyear of 1970 includes the transition. The default
+ cutoff is -500,2500.
-t [lotime,]hitime
- Cut off verbose output at the start of the given time(s), given
- in decimal seconds since 1970-01-01 00:00:00 UTC.
+ Cut off verbose output at the given time(s), given in decimal
+ seconds since 1970-01-01 00:00:00 Coordinated Universal Time
+ (UTC). The zonename determines whether the count includes leap
+ seconds. As with -c, the cutoff's lower bound is exclusive and
+ its upper bound is inclusive.
LIMITATIONS
Time discontinuities are found by sampling the results returned by
diff --git a/elsie.nci.nih.gov/src/zdump.c b/elsie.nci.nih.gov/src/zdump.c
index 2d82fe5..13bbb0e 100644
--- a/elsie.nci.nih.gov/src/zdump.c
+++ b/elsie.nci.nih.gov/src/zdump.c
@@ -304,9 +304,38 @@ sumsize(size_t a, size_t b)
static void tzset(void) { }
#endif
-#if ! HAVE_LOCALTIME_RZ
+/* Assume gmtime_r works if localtime_r does.
+ A replacement localtime_r is defined below if needed. */
+#if ! HAVE_LOCALTIME_R
+
+# undef gmtime_r
+# define gmtime_r zdump_gmtime_r
+
+static struct tm *
+gmtime_r(time_t *tp, struct tm *tmp)
+{
+ struct tm *r = gmtime(tp);
+ if (r) {
+ *tmp = *r;
+ r = tmp;
+ }
+ return r;
+}
-# if ! HAVE_LOCALTIME_R || ! HAVE_TZSET
+#endif
+
+/* Platforms with TM_ZONE don't need tzname, so they can use the
+ faster localtime_rz or localtime_r if available. */
+
+#if defined TM_ZONE && HAVE_LOCALTIME_RZ
+# define USE_LOCALTIME_RZ true
+#else
+# define USE_LOCALTIME_RZ false
+#endif
+
+#if ! USE_LOCALTIME_RZ
+
+# if !defined TM_ZONE || ! HAVE_LOCALTIME_R || ! HAVE_TZSET
# undef localtime_r
# define localtime_r zdump_localtime_r
static struct tm *
@@ -383,7 +412,31 @@ tzfree(timezone_t env)
environ = env + 1;
free(env[0]);
}
-#endif /* ! HAVE_LOCALTIME_RZ */
+#endif /* ! USE_LOCALTIME_RZ */
+
+/* A UTC time zone, and its initializer. */
+static timezone_t gmtz;
+static void
+gmtzinit(void)
+{
+ if (USE_LOCALTIME_RZ) {
+ static char const utc[] = "UTC0";
+ gmtz = tzalloc(utc);
+ if (!gmtz) {
+ perror(utc);
+ exit(EXIT_FAILURE);
+ }
+ }
+}
+
+/* Convert *TP to UTC, storing the broken-down time into *TMP.
+ Return TMP if successful, NULL otherwise. This is like gmtime_r(TP, TMP),
+ except typically faster if USE_LOCALTIME_RZ. */
+static struct tm *
+my_gmtime_r(time_t *tp, struct tm *tmp)
+{
+ return USE_LOCALTIME_RZ ? localtime_rz(gmtz, tp, tmp) : gmtime_r(tp, tmp);
+}
#ifndef TYPECHECK
# define my_localtime_rz localtime_rz
@@ -622,6 +675,7 @@ main(int argc, char *argv[])
}
}
}
+ gmtzinit();
now = time(NULL);
longest = 0;
for (i = optind; i < argc; i++) {
@@ -654,12 +708,11 @@ main(int argc, char *argv[])
tmp = my_localtime_rz(tz, &t, &tm);
if (tmp)
ab = saveabbr(&abbrev, &abbrevsize, &tm);
- for ( ; ; ) {
- newt = (t < absolute_max_time - SECSPERDAY / 2
+ while (t < cuthitime) {
+ newt = ((t < absolute_max_time - SECSPERDAY / 2
+ && t + SECSPERDAY / 2 < cuthitime)
? t + SECSPERDAY / 2
- : absolute_max_time);
- if (cuthitime <= newt)
- break;
+ : cuthitime);
newtmp = localtime_rz(tz, &newt, &newtm);
if ((tmp == NULL || newtmp == NULL) ? (tmp != newtmp) :
(delta(&newtm, &tm) != (newt - t) ||
@@ -798,19 +851,56 @@ delta(struct tm * newp, struct tm *oldp)
return result;
}
+#ifndef TM_GMTOFF
+/* Return A->tm_yday, adjusted to compare it fairly to B->tm_yday.
+ Assume A and B differ by at most one year. */
+static int
+adjusted_yday(struct tm const *a, struct tm const *b)
+{
+ int yday = a->tm_yday;
+ if (b->tm_year < a->tm_year)
+ yday += 365 + isleap_sum(b->tm_year, TM_YEAR_BASE);
+ return yday;
+}
+#endif
+
+/* If A is the broken-down local time and B the broken-down UTC for
+ the same instant, return A's UTC offset in seconds, where positive
+ offsets are east of Greenwich. On failure, return LONG_MIN. */
+static long
+gmtoff(struct tm const *a, struct tm const *b)
+{
+#ifdef TM_GMTOFF
+ return a->TM_GMTOFF;
+#else
+ if (! b)
+ return LONG_MIN;
+ else {
+ int ayday = adjusted_yday(a, b);
+ int byday = adjusted_yday(b, a);
+ int days = ayday - byday;
+ long hours = a->tm_hour - b->tm_hour + 24 * days;
+ long minutes = a->tm_min - b->tm_min + 60 * hours;
+ long seconds = a->tm_sec - b->tm_sec + 60 * minutes;
+ return seconds;
+ }
+#endif
+}
+
static void
show(timezone_t tz, char *zone, time_t t, bool v)
{
register struct tm * tmp;
- struct tm tm;
+ register struct tm * gmtmp;
+ struct tm tm, gmtm;
printf("%-*s ", longest, zone);
if (v) {
- tmp = gmtime(&t);
- if (tmp == NULL) {
+ gmtmp = my_gmtime_r(&t, &gmtm);
+ if (gmtmp == NULL) {
printf(tformat(), t);
} else {
- dumptime(tmp);
+ dumptime(gmtmp);
printf(" UT");
}
printf(" = ");
@@ -821,10 +911,10 @@ show(timezone_t tz, char *zone, time_t t, bool v)
if (*abbr(tmp) != '\0')
printf(" %s", abbr(tmp));
if (v) {
+ long off = gmtoff(tmp, gmtmp);
printf(" isdst=%d", tmp->tm_isdst);
-#ifdef TM_GMTOFF
- printf(" gmtoff=%ld", tmp->TM_GMTOFF);
-#endif /* defined TM_GMTOFF */
+ if (off != LONG_MIN)
+ printf(" gmtoff=%ld", off);
}
}
printf("\n");
@@ -838,9 +928,8 @@ abbr(struct tm const *tmp)
#ifdef TM_ZONE
return tmp->TM_ZONE;
#else
- return ((0 <= tmp->tm_isdst && tmp->tm_isdst <= 1
- && tzname[tmp->tm_isdst])
- ? tzname[tmp->tm_isdst]
+ return (0 <= tmp->tm_isdst && tzname[0 < tmp->tm_isdst]
+ ? tzname[0 < tmp->tm_isdst]
: "");
#endif
}
@@ -893,7 +982,7 @@ dumptime(register const struct tm *timeptr)
return;
}
/*
- ** The packaged localtime_rz and gmtime never put out-of-range
+ ** The packaged localtime_rz and gmtime_r never put out-of-range
** values in tm_wday or tm_mon, but since this code might be compiled
** with other (perhaps experimental) versions, paranoia is in order.
*/
diff --git a/elsie.nci.nih.gov/src/zic.8 b/elsie.nci.nih.gov/src/zic.8
index 11a374f..fac2da7 100644
--- a/elsie.nci.nih.gov/src/zic.8
+++ b/elsie.nci.nih.gov/src/zic.8
@@ -177,7 +177,7 @@ Gives the (arbitrary) name of the set of rules this rule is part of.
.TP
.B FROM
Gives the first year in which the rule applies.
-Any integer year can be supplied; the Gregorian calendar is assumed.
+Any integer year can be supplied; the proleptic Gregorian calendar is assumed.
The word
.B minimum
(or an abbreviation) means the minimum year representable as an integer.
diff --git a/elsie.nci.nih.gov/src/zic.8.txt b/elsie.nci.nih.gov/src/zic.8.txt
index 51f33de..2417a6e 100644
--- a/elsie.nci.nih.gov/src/zic.8.txt
+++ b/elsie.nci.nih.gov/src/zic.8.txt
@@ -120,10 +120,10 @@ DESCRIPTION
part of.
FROM Gives the first year in which the rule applies. Any integer
- year can be supplied; the Gregorian calendar is assumed. The
- word minimum (or an abbreviation) means the minimum year
- representable as an integer. The word maximum (or an
- abbreviation) means the maximum year representable as an
+ year can be supplied; the proleptic Gregorian calendar is
+ assumed. The word minimum (or an abbreviation) means the
+ minimum year representable as an integer. The word maximum (or
+ an abbreviation) means the maximum year representable as an
integer. Rules can describe times that are not representable
as time values, with the unrepresentable times ignored; this
allows rules to be portable among hosts with differing time
diff --git a/elsie.nci.nih.gov/src/zone.tab b/elsie.nci.nih.gov/src/zone.tab
index 084bb2f..a7373f1 100644
--- a/elsie.nci.nih.gov/src/zone.tab
+++ b/elsie.nci.nih.gov/src/zone.tab
@@ -307,7 +307,8 @@ PE -1203-07703 America/Lima
PF -1732-14934 Pacific/Tahiti Society Islands
PF -0900-13930 Pacific/Marquesas Marquesas Islands
PF -2308-13457 Pacific/Gambier Gambier Islands
-PG -0930+14710 Pacific/Port_Moresby
+PG -0930+14710 Pacific/Port_Moresby most locations
+PG -0613+15534 Pacific/Bougainville Bougainville
PH +1435+12100 Asia/Manila
PK +2452+06703 Asia/Karachi
PL +5215+02100 Europe/Warsaw
diff --git a/elsie.nci.nih.gov/src/zone1970.tab b/elsie.nci.nih.gov/src/zone1970.tab
index 03c50d8..e971bc7 100644
--- a/elsie.nci.nih.gov/src/zone1970.tab
+++ b/elsie.nci.nih.gov/src/zone1970.tab
@@ -264,7 +264,8 @@ PE -1203-07703 America/Lima
PF -1732-14934 Pacific/Tahiti Society Islands
PF -0900-13930 Pacific/Marquesas Marquesas Islands
PF -2308-13457 Pacific/Gambier Gambier Islands
-PG -0930+14710 Pacific/Port_Moresby
+PG -0930+14710 Pacific/Port_Moresby most locations
+PG -0613+15534 Pacific/Bougainville Bougainville
PH +1435+12100 Asia/Manila
PK +2452+06703 Asia/Karachi
PL +5215+02100 Europe/Warsaw
@@ -315,7 +316,7 @@ SY +3330+03618 Asia/Damascus
TC +2128-07108 America/Grand_Turk
TD +1207+01503 Africa/Ndjamena
TF -492110+0701303 Indian/Kerguelen Kerguelen, St Paul I, Amsterdam I
-TH,KH,LA,VN +1345+10031 Asia/Bangkok
+TH,KH,LA,VN +1345+10031 Asia/Bangkok most of Indochina
TJ +3835+06848 Asia/Dushanbe
TK -0922-17114 Pacific/Fakaofo
TL -0833+12535 Asia/Dili
@@ -323,7 +324,7 @@ TM +3757+05823 Asia/Ashgabat
TN +3648+01011 Africa/Tunis
TO -2110-17510 Pacific/Tongatapu
TR +4101+02858 Europe/Istanbul
-TT,AG,AI,BL,DM,GD,GP,MF,LC,KN,MS,VC,VG,VI +1039-06131 America/Port_of_Spain
+TT,AG,AI,BL,DM,GD,GP,KN,LC,MF,MS,VC,VG,VI +1039-06131 America/Port_of_Spain
TV -0831+17913 Pacific/Funafuti
TW +2503+12130 Asia/Taipei
UA +5026+03031 Europe/Kiev most locations
@@ -363,6 +364,7 @@ UY -3453-05611 America/Montevideo
UZ +3940+06648 Asia/Samarkand west Uzbekistan
UZ +4120+06918 Asia/Tashkent east Uzbekistan
VE +1030-06656 America/Caracas
+VN +1045+10640 Asia/Ho_Chi_Minh south Vietnam
VU -1740+16825 Pacific/Efate
WF -1318-17610 Pacific/Wallis
WS -1350-17144 Pacific/Apia