aboutsummaryrefslogtreecommitdiff
path: root/timezone
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /timezone
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.bz2
2.5-18.1
Diffstat (limited to 'timezone')
-rw-r--r--timezone/Makefile30
-rw-r--r--timezone/africa33
-rw-r--r--timezone/antarctica51
-rw-r--r--timezone/asia355
-rw-r--r--timezone/australasia155
-rw-r--r--timezone/backward34
-rw-r--r--timezone/checktab.awk4
-rw-r--r--timezone/etcetera7
-rw-r--r--timezone/europe213
-rw-r--r--timezone/factory2
-rw-r--r--timezone/iso3166.tab6
-rw-r--r--timezone/leapseconds65
-rw-r--r--timezone/northamerica560
-rw-r--r--timezone/pacificnew2
-rw-r--r--timezone/private.h123
-rw-r--r--timezone/scheck.c9
-rw-r--r--timezone/solar878
-rw-r--r--timezone/solar888
-rw-r--r--timezone/solar898
-rw-r--r--timezone/southamerica79
-rw-r--r--timezone/systemv36
-rw-r--r--timezone/tst-timezone.c6
-rw-r--r--timezone/tzfile.h62
-rw-r--r--timezone/tzselect.ksh4
-rwxr-xr-xtimezone/yearistype8
-rw-r--r--timezone/zdump.c460
-rw-r--r--timezone/zic.c988
-rw-r--r--timezone/zone.tab43
28 files changed, 2350 insertions, 1009 deletions
diff --git a/timezone/Makefile b/timezone/Makefile
index cf2c7d7..9947d45 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1998,1999,2000,2002,2005 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -190,28 +190,24 @@ $(objpfx)tst-timezone.out: $(addprefix $(testdata)/, \
test-tz-ENV = TZDIR=$(testdata)
tst-timezone-ENV = TZDIR=$(testdata)
-$(testdata)/America/New_York: northamerica $(objpfx)zic $(leapseconds) \
- yearistype
- $(build-testdata)
-$(testdata)/Etc/UTC: etcetera $(objpfx)zic $(leapseconds) yearistype
- $(build-testdata)
-$(testdata)/UTC: simplebackw $(objpfx)zic $(testdata)/Etc/UTC \
- $(leapseconds) yearistype
+# Note this must come second in the deps list for $(built-program-cmd) to work.
+zic-deps = $(objpfx)zic $(leapseconds) yearistype
+
+$(testdata)/America/New_York: northamerica $(zic-deps)
$(build-testdata)
-$(testdata)/Europe/Berlin: europe $(objpfx)zic $(leapseconds) yearistype
+$(testdata)/Etc/UTC: etcetera $(zic-deps)
$(build-testdata)
-$(testdata)/Universal: simplebackw $(objpfx)zic $(testdata)/Etc/UTC \
- $(leapseconds) yearistype
+# Use a pattern rule to indicate the command produces both targets at once.
+# Two separate targets built separately can collide if in parallel.
+%/UTC %/Universal: simplebackw $(zic-deps) %/Etc/UTC
$(build-testdata)
-$(testdata)/Australia/Melbourne: australasia $(objpfx)zic $(leapseconds) \
- yearistype
+$(testdata)/%/Berlin $(testdata)/%/London: europe $(zic-deps)
$(build-testdata)
-$(testdata)/America/Sao_Paulo: southamerica $(objpfx)zic $(leapseconds) \
- yearistype
+$(testdata)/Australia/Melbourne: australasia $(zic-deps)
$(build-testdata)
-$(testdata)/Asia/Tokyo: asia $(objpfx)zic $(leapseconds) yearistype
+$(testdata)/America/Sao_Paulo: southamerica $(zic-deps)
$(build-testdata)
-$(testdata)/Europe/London: europe $(objpfx)zic $(leapseconds) yearistype
+$(testdata)/Asia/Tokyo: asia $(zic-deps)
$(build-testdata)
diff --git a/timezone/africa b/timezone/africa
index e8223f7..29625df 100644
--- a/timezone/africa
+++ b/timezone/africa
@@ -1,10 +1,11 @@
-# @(#)africa 7.36
+# @(#)africa 8.1
+# <pre>
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
# tz@elsie.nci.nih.gov for general use in the future).
-# From Paul Eggert <eggert@twinsun.com> (1999-03-22):
+# From Paul Eggert (1999-03-22):
#
# A good source for time zone historical data outside the U.S. is
# Thomas G. Shanks, The International Atlas (5th edition),
@@ -28,7 +29,7 @@
#
# Previous editions of this database used WAT, CAT, SAT, and EAT
# for +0:00 through +3:00, respectively,
-# but Mark R V Murray <markm@grondar.za> reports that
+# but Mark R V Murray reports that
# `SAST' is the official abbreviation for +2:00 in the country of South Africa,
# `CAT' is commonly used for +2:00 in countries north of South Africa, and
# `WAT' is probably the best name for +1:00, as the common phrase for
@@ -287,7 +288,7 @@ Zone Africa/Maseru 1:50:00 - LMT 1903 Mar
2:00 - SAST
# Liberia
-# From Paul Eggert <eggert@twinsun.com> (2001-07-17):
+# From Paul Eggert (2001-07-17):
# In 1972 Liberia was the last country to switch
# from a UTC offset that was not a multiple of 15 or 20 minutes.
# Howse reports that it was in honor of their president's birthday.
@@ -317,7 +318,7 @@ Rule Libya 1985 only - Apr 6 0:00 1:00 S
Rule Libya 1986 only - Apr 4 0:00 1:00 S
Rule Libya 1986 only - Oct 3 0:00 0 -
Rule Libya 1987 1989 - Apr 1 0:00 1:00 S
-Rule Libya 1987 1990 - Oct 1 0:00 0 -
+Rule Libya 1987 1989 - Oct 1 0:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Africa/Tripoli 0:52:44 - LMT 1920
1:00 Libya CE%sT 1959
@@ -348,9 +349,6 @@ Zone Africa/Bamako -0:32:00 - LMT 1912
0:00 - GMT 1934 Feb 26
-1:00 - WAT 1960 Jun 20
0:00 - GMT
-# no longer different from Bamako, but too famous to omit
-Zone Africa/Timbuktu -0:12:04 - LMT 1912
- 0:00 - GMT
# Mauritania
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -557,6 +555,23 @@ Zone Africa/Lome 0:04:52 - LMT 1893
0:00 - GMT
# Tunisia
+
+# From Gwillim Law (2005-04-30):
+#
+# My correspondent, Risto Nykanen, has alerted me to another adoption of DST,
+# this time in Tunisia. According to Yahoo France News
+# <http://fr.news.yahoo.com/050426/5/4dumk.html>, in a story attributed to AP
+# and dated 2005-04-26, "Tunisia has decided to advance its official time by
+# one hour, starting on Sunday, May 1. Henceforth, Tunisian time will be
+# UTC+2 instead of UTC+1. The change will take place at 23:00 UTC next
+# Saturday." (My translation)
+#
+# From Oscar van Vlijmen (2005-05-02):
+# LaPresse, the first national daily newspaper ...
+# <http://www.lapresse.tn/archives/archives280405/actualites/lheure.html>
+# ... DST for 2005: on: Sun May 1 0h standard time, off: Fri Sept. 30,
+# 1h standard time.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Tunisia 1939 only - Apr 15 23:00s 1:00 S
Rule Tunisia 1939 only - Nov 18 23:00s 0 -
@@ -579,6 +594,8 @@ Rule Tunisia 1988 only - Jun 1 0:00s 1:00 S
Rule Tunisia 1988 1990 - Sep lastSun 0:00s 0 -
Rule Tunisia 1989 only - Mar 26 0:00s 1:00 S
Rule Tunisia 1990 only - May 1 0:00s 1:00 S
+Rule Tunisia 2005 only - May 1 0:00s 1:00 S
+Rule Tunisia 2005 only - Sep 30 1:00s 0 -
# Shanks gives 0:09 for Paris Mean Time; go with Howse's more precise 0:09:21.
# Shanks says the 1911 switch occurred on Mar 9; go with Howse's Mar 11.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
diff --git a/timezone/antarctica b/timezone/antarctica
index b5c12cb..8a9ea93 100644
--- a/timezone/antarctica
+++ b/timezone/antarctica
@@ -1,4 +1,5 @@
-# @(#)antarctica 7.23
+# @(#)antarctica 8.1
+# <pre>
# From Paul Eggert (1999-11-15):
# To keep things manageable, we list only locations occupied year-round; see
@@ -59,7 +60,7 @@ Rule ChileAQ 2000 max - Mar Sun>=9 0:00 0 -
# Australia - territories
# Heard Island, McDonald Islands (uninhabited)
# previously sealers and scientific personnel wintered
-# <a href="http://www.dstc.qut.edu.au/DST/marg/daylight.html">
+# <a href="http://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html">
# Margaret Turner reports
# </a> (1999-09-30) that they're UTC+5, with no DST;
# presumably this is when they have visitors.
@@ -90,23 +91,23 @@ Zone Antarctica/Mawson 0 - zzz 1954 Feb 13
# </a>
# Brazil - year-round base
-# Ferraz, King George Island, since 1983/4
+# Comandante Ferraz, King George Island, -6205+05824, since 1983/4
# Chile - year-round bases and towns
# Escudero, South Shetland Is, -621157-0585735, since 1994
-# Frei, King George Island, -6214-05848, since 1969-03-07
-# O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
-# Prat, -6230-05941
-# Villa Las Estrellas (a town), King George Island, since 1984-04-09
+# Presidente Eduadro Frei, King George Island, -6214-05848, since 1969-03-07
+# General Bernardo O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
+# Capitan Arturo Prat, -6230-05941
+# Villa Las Estrellas (a town), around the Frei base, since 1984-04-09
# These locations have always used Santiago time; use TZ='America/Santiago'.
# China - year-round bases
-# Great Wall, King George Island, since 1985-02-20
-# Zhongshan, Larsemann Hills, Prydz Bay, since 1989-02-26
+# Great Wall, King George Island, -6213-05858, since 1985-02-20
+# Zhongshan, Larsemann Hills, Prydz Bay, -6922+07623, since 1989-02-26
# France - year-round bases
#
-# From Antoine Leca <Antoine.Leca@Renault.FR> (1997-01-20):
+# From Antoine Leca (1997-01-20):
# Time data are from Nicole Pailleau at the IFRTP
# (French Institute for Polar Research and Technology).
# She confirms that French Southern Territories and Terre Adelie bases
@@ -139,25 +140,22 @@ Zone Antarctica/DumontDUrville 0 - zzz 1947
0 - zzz 1956 Nov
10:00 - DDUT # Dumont-d'Urville Time
# Reference:
-# <a href="http://www.icair.iac.org.nz/science/reports/fr/IFRTP.html">
-# Support and Development of Polar Research and Technology (1997-02-03)
+# <a href="http://en.wikipedia.org/wiki/Dumont_d'Urville_Station">
+# Dumont d'Urville Station (2005-12-05)
# </a>
-
# Germany - year-round base
-# Georg von Neumayer
+# Georg von Neumayer, -7039-00815
# India - year-round base
-# Dakshin Gangotri
+# Dakshin Gangotri, -7005+01200
# Japan - year-round bases
-# Dome Fuji
-# Syowa
+# Dome Fuji, -7719+03942
+# Syowa, -690022+0393524
#
# From Hideyuki Suzuki (1999-02-06):
-# In all Japanese stations, +0300 is used as the standard time. [See]
-# <a href="http://www.crl.go.jp/uk/uk201/basyo.htm">[reference in Japanese]</a>
-# and information from KAMO Hiroyasu <wd@ics.nara-wu.ac.jp>.
+# In all Japanese stations, +0300 is used as the standard time.
#
# Syowa station, which is the first antarctic station of Japan,
# was established on 1957-01-29. Since Syowa station is still the main
@@ -171,7 +169,7 @@ Zone Antarctica/Syowa 0 - zzz 1957 Jan 29
# </a>
# S Korea - year-round base
-# King Sejong, King George Island, since 1988
+# King Sejong, King George Island, -6213-05847, since 1988
# New Zealand - claims
# Balleny Islands (never inhabited)
@@ -202,7 +200,8 @@ Rule NZAQ 1990 max - Mar Sun>=15 2:00s 0 S
# Russia - year-round bases
# Bellingshausen, King George Island, -621159-0585337, since 1968-02-22
# Mirny, Davis coast, -6633+09301, since 1956-02
-# Molodezhnaya, Alasheyev Bay, year-round from 1962-02 to 1999-07-01
+# Molodezhnaya, Alasheyev Bay, -6740+04551,
+# year-round from 1962-02 to 1999-07-01
# Novolazarevskaya, Queen Maud Land, -7046+01150,
# year-round from 1960/61 to 1992
@@ -234,8 +233,8 @@ Zone Antarctica/Vostok 0 - zzz 1957 Dec 16
6:00 - VOST # Vostok time
# S Africa - year-round bases
-# Marion Island
-# Sanae
+# Marion Island, -4653+03752
+# Sanae, -7141-00250
# UK
#
@@ -270,7 +269,7 @@ Zone Antarctica/Rothera 0 - zzz 1976 Dec 1
#
# Palmer, Anvers Island, since 1965 (moved 2 miles in 1968)
#
-# From Ethan Dicks <erd@mcmsun5.mcmurdo.gov> (1996-10-06):
+# From Ethan Dicks (1996-10-06):
# It keeps the same time as Punta Arenas, Chile, because, just like us
# and the South Pole, that's the other end of their supply line....
# I verified with someone who was there that since 1980,
@@ -295,7 +294,7 @@ Zone Antarctica/McMurdo 0 - zzz 1956
# Normally it wouldn't have a separate entry, since it's like the
# larger Antarctica/McMurdo since 1970, but it's too famous to omit.
#
-# From Chris Carrier <72157.3334@CompuServe.COM> (1996-06-27):
+# From Chris Carrier (1996-06-27):
# Siple, the first commander of the South Pole station,
# stated that he would have liked to have kept GMT at the station,
# but that he found it more convenient to keep GMT+12
diff --git a/timezone/asia b/timezone/asia
index 3c2c1a1..446cc16 100644
--- a/timezone/asia
+++ b/timezone/asia
@@ -1,10 +1,11 @@
-# @(#)asia 7.77
+# @(#)asia 8.1
+# <pre>
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
# tz@elsie.nci.nih.gov for general use in the future).
-# From Paul Eggert <eggert@twinsun.com> (1999-03-22):
+# From Paul Eggert (1999-03-22):
#
# A good source for time zone historical data outside the U.S. is
# Thomas G. Shanks, The International Atlas (5th edition),
@@ -43,8 +44,8 @@
# 8:00 CST China
# 9:00 CJT Central Japanese Time (1896/1937)*
# 9:00 EIT east Indonesia
-# 9:00 JST Japan
-# 9:00 KST Korea
+# 9:00 JST JDT Japan
+# 9:00 KST KDT Korea
# 9:30 CST (Australian) Central Standard Time
#
# See the `europe' file for Russia and Turkey in Asia.
@@ -85,7 +86,7 @@ Zone Asia/Kabul 4:36:48 - LMT 1890
# Shanks has Yerevan switching to 3:00 (with Russian DST) in spring 1991,
# then to 4:00 with no DST in fall 1995, then readopting Russian DST in 1997.
# Go with Shanks, even when he disagrees with others. Edgar Der-Danieliantz
-# <edd@AIC.NET> reported (1996-05-04) that Yerevan probably wouldn't use DST
+# reported (1996-05-04) that Yerevan probably wouldn't use DST
# in 1996, though it did use DST in 1995. IATA SSIM (1991/1998) reports that
# Armenia switched from 3:00 to 4:00 in 1998 and observed DST after 1991,
# but started switching at 3:00s in 1998.
@@ -99,15 +100,18 @@ Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2
4:00 RussiaAsia AM%sT
# 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
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-Rule Azer 1997 max - Mar lastSun 1:00 1:00 S
-Rule Azer 1997 max - Oct lastSun 1:00 0 -
+Rule Azer 1997 max - Mar lastSun 4:00 1:00 S
+Rule Azer 1997 max - Oct lastSun 5:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Baku 3:19:24 - LMT 1924 May 2
3:00 - BAKT 1957 Mar # Baku Time
4:00 RussiaAsia BAK%sT 1991 Mar 31 2:00s
3:00 1:00 BAKST 1991 Aug 30 # independence
- 3:00 RussiaAsia AZ%sT 1992 Sep lastSun 2:00s
+ 3:00 RussiaAsia AZ%sT 1992 Sep lastSat 23:00
4:00 - AZT 1996 # Azerbaijan time
4:00 EUAsia AZ%sT 1997
4:00 Azer AZ%sT
@@ -137,8 +141,12 @@ Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu
# British Indian Ocean Territory
# Whitman and the 1995 CIA time zone map say 5:00, but the
# 1997 and later maps say 6:00. Assume the switch occurred in 1996.
+# We have no information as to when standard time was introduced;
+# assume it occurred in 1907, the same year as Mauritius (which
+# then contained the Chagos Archipelago).
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Indian/Chagos 5:00 - IOT 1996 # BIOT Time
+Zone Indian/Chagos 4:49:40 - LMT 1907
+ 5:00 - IOT 1996 # BIOT Time
6:00 - IOT
# Brunei
@@ -186,7 +194,7 @@ Zone Asia/Phnom_Penh 6:59:40 - LMT 1906 Jun 9
# CHINA 8 H AHEAD OF UTC ALL OF CHINA, INCL TAIWAN
# CHINA 9 H AHEAD OF UTC APR 17 - SEP 10
-# From Paul Eggert <eggert@twinsun.com> (1995-12-19):
+# From Paul Eggert (1995-12-19):
# Shanks writes that China has had a single time zone since 1980 May 1,
# observing summer DST from 1986 through 1991; this contradicts Devine's
# note about Time magazine, though apparently _something_ happened in 1986.
@@ -197,7 +205,6 @@ Zone Asia/Phnom_Penh 6:59:40 - LMT 1906 Jun 9
Rule Shang 1940 only - Jun 3 0:00 1:00 D
Rule Shang 1940 1941 - Oct 1 0:00 0 S
Rule Shang 1941 only - Mar 16 0:00 1:00 D
-Rule PRC 1949 only - Jan 1 0:00 0 S
Rule PRC 1986 only - May 4 0:00 1:00 D
Rule PRC 1986 1991 - Sep Sun>=11 0:00 0 S
Rule PRC 1987 1991 - Apr Sun>=10 0:00 1:00 D
@@ -325,19 +332,19 @@ Zone Asia/Nicosia 2:13:28 - LMT 1921 Nov 14
Link Asia/Nicosia Europe/Nicosia
# Georgia
-# From Paul Eggert <eggert@twinsun.com> (1994-11-19):
+# From Paul Eggert (1994-11-19):
# Today's _Economist_ (p 60) reports that Georgia moved its clocks forward
# an hour recently, due to a law proposed by Zurab Murvanidze,
# an MP who went on a hunger strike for 11 days to force discussion about it!
# We have no details, but we'll guess they didn't move the clocks back in fall.
#
-# From Mathew Englander <mathew@io.org>, quoting AP (1996-10-23 13:05-04):
+# From Mathew Englander, quoting AP (1996-10-23 13:05-04):
# Instead of putting back clocks at the end of October, Georgia
# will stay on daylight savings time this winter to save energy,
# President Eduard Shevardnadze decreed Wednesday.
#
# From the BBC via Joseph S. Myers (2004-06-27):
-#
+#
# Georgia moved closer to Western Europe on Sunday... The former Soviet
# republic has changed its time zone back to that of Moscow. As a result it
# is now just four hours ahead of Greenwich Mean Time, rather than five hours
@@ -345,6 +352,17 @@ Link Asia/Nicosia Europe/Nicosia
# Mikhail Saakashvili, who said the change was partly prompted by the process
# of integration into Europe.
+# From Teimuraz Abashidze (2005-11-07):
+# Government of Georgia ... decided to NOT CHANGE daylight savings time on
+# [Oct.] 30, as it was done before during last more than 10 years.
+# Currently, we are in fact GMT +4:00, as before 30 October it was GMT
+# +3:00.... The problem is, there is NO FORMAL LAW or governmental document
+# about it. As far as I can find, I was told, that there is no document,
+# because we just DIDN'T ISSUE document about switching to winter time....
+# I don't know what can be done, especially knowing that some years ago our
+# DST rules where changed THREE TIMES during one month.
+
+
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Tbilisi 2:59:16 - LMT 1880
2:59:16 - TBMT 1924 May 2 # Tbilisi Mean Time
@@ -356,7 +374,8 @@ Zone Asia/Tbilisi 2:59:16 - LMT 1880
4:00 E-EurAsia GE%sT 1996 Oct lastSun
4:00 1:00 GEST 1997 Mar lastSun
4:00 E-EurAsia GE%sT 2004 Jun 27
- 3:00 RussiaAsia GE%sT
+ 3:00 RussiaAsia GE%sT 2005 Mar lastSun 2:00
+ 4:00 - GET
# East Timor
@@ -383,11 +402,11 @@ Zone Asia/Tbilisi 2:59:16 - LMT 1880
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Dili 8:22:20 - LMT 1912
- 8:00 - TPT 1942 Feb 21 23:00 # E Timor Time
+ 8:00 - TLT 1942 Feb 21 23:00 # E Timor Time
9:00 - JST 1945 Aug
- 9:00 - TPT 1976 May 3
+ 9:00 - TLT 1976 May 3
8:00 - CIT 2000 Sep 17 00:00
- 9:00 - TPT
+ 9:00 - TLT
# India
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
@@ -472,12 +491,33 @@ Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov
# Thursday night of Shahrivar, but I can't give exact dates....
# I have also changed the abbreviations to what is considered correct
# here in Iran, IRST for regular time and IRDT for daylight saving time.
-
-# From Paul Eggert (2003-03-15)
+#
+# From Roozbeh Pournader (2005-04-05):
+# The text of the Iranian law, in effect since 1925, clearly mentions
+# that the true solar year is the measure, and there is no arithmetic
+# leap year calculation involved. There has never been any serious
+# plan to change that law....
+#
+# From Paul Eggert (2005-04-05):
# Go with Shanks before September 1991, and with Pournader thereafter.
-# I used Ed Reingold's cal-persia in GNU Emacs 21.2 to check Persian dates.
-# The Persian calendar is based on the sun, and dates after around 2050
-# are approximate; stop after 2037 when 32-bit time_t's overflow.
+# I used Ed Reingold's cal-persia in GNU Emacs 21.2 to check Persian dates,
+# stopping after 2037 when 32-bit time_t's overflow.
+# That cal-persia used Birashk's approximation, which disagrees with the solar
+# calendar predictions for the year 2025, so I corrected those dates by hand.
+#
+# From Oscar van Vlijmen (2005-03-30), writing about future
+# discrepancies between cal-persia and the Iranian calendar:
+# For 2091 solar-longitude-after yields 2091-03-20 08:40:07.7 UT for
+# the vernal equinox and that gets so close to 12:00 some local
+# Iranian time that the definition of the correct location needs to be
+# known exactly, amongst other factors. 2157 is even closer:
+# 2157-03-20 08:37:15.5 UT. But the Gregorian year 2025 should give
+# no interpretation problem whatsoever. By the way, another instant
+# in the near future where there will be a discrepancy between
+# arithmetical and astronomical Iranian calendars will be in 2058:
+# vernal equinox on 2058-03-20 09:03:05.9 UT. The Java version of
+# Reingold's/Dershowitz' calculator gives correctly the Gregorian date
+# 2058-03-21 for 1 Farvardin 1437 (astronomical).
#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Iran 1978 1980 - Mar 21 0:00 1:00 D
@@ -515,10 +555,10 @@ Rule Iran 2020 only - Mar 21 0:00 1:00 D
Rule Iran 2020 only - Sep 21 0:00 0 S
Rule Iran 2021 2023 - Mar 22 0:00 1:00 D
Rule Iran 2021 2023 - Sep 22 0:00 0 S
-Rule Iran 2024 2025 - Mar 21 0:00 1:00 D
-Rule Iran 2024 2025 - Sep 21 0:00 0 S
-Rule Iran 2026 2027 - Mar 22 0:00 1:00 D
-Rule Iran 2026 2027 - Sep 22 0:00 0 S
+Rule Iran 2024 only - Mar 21 0:00 1:00 D
+Rule Iran 2024 only - Sep 21 0:00 0 S
+Rule Iran 2025 2027 - Mar 22 0:00 1:00 D
+Rule Iran 2025 2027 - Sep 22 0:00 0 S
Rule Iran 2028 2029 - Mar 21 0:00 1:00 D
Rule Iran 2028 2029 - Sep 21 0:00 0 S
Rule Iran 2030 2031 - Mar 22 0:00 1:00 D
@@ -539,7 +579,7 @@ Zone Asia/Tehran 3:25:44 - LMT 1916
# Iraq
#
-# From Jonathan Lennox <lennox@cs.columbia.edu> (2000-06-12):
+# From Jonathan Lennox (2000-06-12):
# An article in this week's Economist ("Inside the Saddam-free zone", p. 50 in
# the U.S. edition) on the Iraqi Kurds contains a paragraph:
# "The three northern provinces ... switched their clocks this spring and
@@ -638,8 +678,9 @@ Rule Zion 1987 only - Sep 13 0:00 0 S
Rule Zion 1988 only - Apr 9 0:00 1:00 D
Rule Zion 1988 only - Sep 3 0:00 0 S
-# From Ephraim Silverberg <ephraim@cs.huji.ac.il>
-# (1997-03-04, 1998-03-16, 1998-12-28, 2000-01-17 and 2000-07-25):
+# From Ephraim Silverberg
+# (1997-03-04, 1998-03-16, 1998-12-28, 2000-01-17, 2000-07-25, 2004-12-22,
+# and 2005-02-17):
# According to the Office of the Secretary General of the Ministry of
# Interior, there is NO set rule for Daylight-Savings/Standard time changes.
@@ -690,13 +731,13 @@ Rule Zion 1995 only - Sep 3 0:00 0 S
# time, Haim Ramon. The official announcement regarding 1996-1998
# (with the dates for 1997-1998 no longer being relevant) can be viewed at:
#
-# ftp://ftp.huji.ac.il/pub/tz/announcements/1996-1998.ramon.ps.gz
+# ftp://ftp.cs.huji.ac.il/pub/tz/announcements/1996-1998.ramon.ps.gz
#
# The dates for 1997-1998 were altered by his successor, Rabbi Eli Suissa.
#
# The official announcements for the years 1997-1999 can be viewed at:
#
-# ftp://ftp.huji.ac.il/pub/tz/announcements/YYYY.ps.gz
+# ftp://ftp.cs.huji.ac.il/pub/tz/announcements/YYYY.ps.gz
#
# where YYYY is the relevant year.
@@ -716,12 +757,12 @@ Rule Zion 1999 only - Sep 3 2:00 0 S
#
# The official announcement for the start date of 2000 can be viewed at:
#
-# ftp://ftp.huji.ac.il/pub/tz/announcements/2000-start.ps.gz
+# ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2000-start.ps.gz
#
# The official announcement for the end date of 2000 and the dates
# for the years 2001-2004 can be viewed at:
#
-# ftp://ftp.huji.ac.il/pub/tz/announcements/2000-2004.ps.gz
+# ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2000-2004.ps.gz
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Zion 2000 only - Apr 14 2:00 1:00 D
@@ -735,52 +776,80 @@ Rule Zion 2003 only - Oct 3 1:00 0 S
Rule Zion 2004 only - Apr 7 1:00 1:00 D
Rule Zion 2004 only - Sep 22 1:00 0 S
-# From Paul Eggert (2000-07-25):
-# Here are guesses for rules after 2004.
-# They are probably wrong, but they are more likely than no DST at all.
-# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-Rule Zion 2005 max - Apr 1 1:00 1:00 D
-Rule Zion 2005 max - Oct 1 1:00 0 S
+# The proposed law agreed upon by the Knesset Interior Committee on
+# 2005-02-14 is that, for 2005 and beyond, DST starts at 02:00 the
+# last Friday before April 2nd (i.e. the last Friday in March or April
+# 1st itself if it falls on a Friday) and ends at 02:00 on the Saturday
+# night _before_ the fast of Yom Kippur.
+#
+# Those who can read Hebrew can view the announcement at:
+#
+# ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2005+beyond.ps
+
+# From Paul Eggert (2005-02-22):
+# I used Ephraim Silverberg's dst-israel.el program
+# <ftp://ftp.cs.huji.ac.il/pub/tz/software/dst-israel.el> (2005-02-20)
+# along with Ed Reingold's cal-hebrew in GNU Emacs 21.4,
+# to generate the transitions in this list.
+# (I replaced "lastFri" with "Fri>=26" by hand.)
+# The spring transitions below all correspond to the following Rule:
+#
+# Rule Zion 2005 max - Mar Fri>=26 2:00 1:00 D
+#
+# but older zic implementations (e.g., Solaris 8) do not support
+# "Fri>=26" to mean April 1 in years like 2005, so for now we list the
+# springtime transitions explicitly.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Zion 2005 only - Apr 1 2:00 1:00 D
+Rule Zion 2005 only - Oct 9 2:00 0 S
+Rule Zion 2006 2010 - Mar Fri>=26 2:00 1:00 D
+Rule Zion 2006 only - Oct 1 2:00 0 S
+Rule Zion 2007 only - Sep 16 2:00 0 S
+Rule Zion 2008 only - Oct 5 2:00 0 S
+Rule Zion 2009 only - Sep 27 2:00 0 S
+Rule Zion 2010 only - Sep 12 2:00 0 S
+Rule Zion 2011 only - Apr 1 2:00 1:00 D
+Rule Zion 2011 only - Oct 2 2:00 0 S
+Rule Zion 2012 2015 - Mar Fri>=26 2:00 1:00 D
+Rule Zion 2012 only - Sep 23 2:00 0 S
+Rule Zion 2013 only - Sep 8 2:00 0 S
+Rule Zion 2014 only - Sep 28 2:00 0 S
+Rule Zion 2015 only - Sep 20 2:00 0 S
+Rule Zion 2016 only - Apr 1 2:00 1:00 D
+Rule Zion 2016 only - Oct 9 2:00 0 S
+Rule Zion 2017 2021 - Mar Fri>=26 2:00 1:00 D
+Rule Zion 2017 only - Sep 24 2:00 0 S
+Rule Zion 2018 only - Sep 16 2:00 0 S
+Rule Zion 2019 only - Oct 6 2:00 0 S
+Rule Zion 2020 only - Sep 27 2:00 0 S
+Rule Zion 2021 only - Sep 12 2:00 0 S
+Rule Zion 2022 only - Apr 1 2:00 1:00 D
+Rule Zion 2022 only - Oct 2 2:00 0 S
+Rule Zion 2023 2032 - Mar Fri>=26 2:00 1:00 D
+Rule Zion 2023 only - Sep 24 2:00 0 S
+Rule Zion 2024 only - Oct 6 2:00 0 S
+Rule Zion 2025 only - Sep 28 2:00 0 S
+Rule Zion 2026 only - Sep 20 2:00 0 S
+Rule Zion 2027 only - Oct 10 2:00 0 S
+Rule Zion 2028 only - Sep 24 2:00 0 S
+Rule Zion 2029 only - Sep 16 2:00 0 S
+Rule Zion 2030 only - Oct 6 2:00 0 S
+Rule Zion 2031 only - Sep 21 2:00 0 S
+Rule Zion 2032 only - Sep 12 2:00 0 S
+Rule Zion 2033 only - Apr 1 2:00 1:00 D
+Rule Zion 2033 only - Oct 2 2:00 0 S
+Rule Zion 2034 2037 - Mar Fri>=26 2:00 1:00 D
+Rule Zion 2034 only - Sep 17 2:00 0 S
+Rule Zion 2035 only - Oct 7 2:00 0 S
+Rule Zion 2036 only - Sep 28 2:00 0 S
+Rule Zion 2037 only - Sep 13 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Jerusalem 2:20:56 - LMT 1880
2:20:40 - JMT 1918 # Jerusalem Mean Time?
2:00 Zion I%sT
-# From Ephraim Silverberg (2003-03-23):
-#
-# Minister of Interior Poraz has announced that he will respect the law
-# passed in July 2000 (proposed at the time jointly by himself and
-# then-MK David Azulai [Shas]) fixing the dates for 2000-2004. Hence,
-# the dates for 2003 and 2004 remain unchanged....
-#
-# As far as 2005 and beyond, no dates have been set. However, the
-# minister has mentioned that he wishes to propose to move Israel's
-# timezone in 2005 from GMT+2 to GMT+3 and upon that have DST during
-# the summer months (i.e. GMT+4). However, no legislation in this
-# direction is expected until the latter part of 2004 which is a long
-# time off in terms of Israeli politics.
-
-# (2004-09-20):
-# The latest rumour, however, is that in 2005, when the clock changes to
-# Daylight Saving Time (date as yet unknown), the move will be a two-hour leap
-# forward (from UTC+0200 to UTC+0400) and then, in the fall, the clock will
-# move back only an hour to UTC+0300 thus effectively moving Israel's timezone
-# from UTC+0200 to UTC+0300. However, no actual draft has been put before the
-# Knesset (Israel's Parliament) though the intention is to do so this
-# month [2004-09].
-
-# (2004-09-26):
-# Even though the draft law for the above did pass the Ministerial Committee
-# for Legislative Matters three months ago, it was voted down in today's
-# Cabinet meeting. The current suggestion is to keep the current timezone at
-# UTC+0200 but have an extended period of Daylight Saving Time (UTC+0300) from
-# the beginning of Passover holiday in the spring to after the Tabernacle
-# holiday in the fall (i.e. the dates of which are governed by the Hebrew
-# calendar but this means at least 184 days of DST). However, this is only a
-# suggestion that was raised in today's cabinet meeting and has not yet been
-# drafted.
-
###############################################################################
@@ -789,18 +858,32 @@ Zone Asia/Jerusalem 2:20:56 - LMT 1880
# `9:00' and `JST' is from Guy Harris.
-# From Paul Eggert <eggert@twinsun.com> (1995-03-06):
+# From Paul Eggert (1995-03-06):
# Today's _Asahi Evening News_ (page 4) reports that Japan had
# daylight saving between 1948 and 1951, but ``the system was discontinued
# because the public believed it would lead to longer working hours.''
+
+# From Mayumi Negishi in the 2005-08-10 Japan Times
+# <http://www.japantimes.co.jp/cgi-bin/getarticle.pl5?nn20050810f2.htm>:
+# Occupation authorities imposed daylight-saving time on Japan on
+# [1948-05-01].... But lack of prior debate and the execution of
+# daylight-saving time just three days after the bill was passed generated
+# deep hatred of the concept.... The Diet unceremoniously passed a bill to
+# dump the unpopular system in October 1951, less than a month after the San
+# Francisco Peace Treaty was signed. (A government poll in 1951 showed 53%
+# of the Japanese wanted to scrap daylight-saving time, as opposed to 30% who
+# wanted to keep it.)
+
# Shanks writes that daylight saving in Japan during those years was as follows:
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-#Rule Japan 1948 only - May Sun>=1 2:00 1:00 D
-#Rule Japan 1948 1951 - Sep Sat>=8 2:00 0 S
-#Rule Japan 1949 only - Apr Sun>=1 2:00 1:00 D
-#Rule Japan 1950 1951 - May Sun>=1 2:00 1:00 D
-# but the only locations using it were US military bases.
-# We go with Shanks and omit daylight saving in those years for Asia/Tokyo.
+Rule Japan 1948 only - May Sun>=1 2:00 1:00 D
+Rule Japan 1948 1951 - Sep Sat>=8 2:00 0 S
+Rule Japan 1949 only - Apr Sun>=1 2:00 1:00 D
+Rule Japan 1950 1951 - May Sun>=1 2:00 1:00 D
+# but the only locations using it (for birth certificates, presumably, since
+# Shanks's audience is astrologers) were US military bases. For now, assume
+# that for most purposes daylight-saving time was observed; otherwise, what
+# would have been the point of the 1951 poll?
# From Hideyuki Suzuki (1998-11-09):
# 'Tokyo' usually stands for the former location of Tokyo Astronomical
@@ -830,7 +913,7 @@ Zone Asia/Jerusalem 2:20:56 - LMT 1880
Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u
9:00 - JST 1896
9:00 - CJT 1938
- 9:00 - JST
+ 9:00 Japan J%sT
# Since 1938, all Japanese possessions have been like Asia/Tokyo.
# Jordan
@@ -848,6 +931,13 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u
# The decision was taken because of the increase in working hours in
# government's departments from six to seven hours.
#
+# From Paul Eggert (2005-11-22):
+# Starting 2003 transitions are from Steffen Thorsen's web site timeanddate.com.
+#
+# From Steffen Thorsen (2005-11-23):
+# For Jordan I have received multiple independent user reports every year
+# about DST end dates, as the end-rule is different every year.
+#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Jordan 1973 only - Jun 6 0:00 1:00 S
Rule Jordan 1973 1975 - Oct 1 0:00 0 -
@@ -870,20 +960,25 @@ Rule Jordan 1993 1998 - Apr Fri>=1 0:00 1:00 S
Rule Jordan 1994 only - Sep Fri>=15 0:00 0 -
Rule Jordan 1995 1998 - Sep Fri>=15 0:00s 0 -
Rule Jordan 1999 only - Jul 1 0:00s 1:00 S
-Rule Jordan 1999 max - Sep lastThu 0:00s 0 -
+Rule Jordan 1999 2002 - Sep lastThu 0:00s 0 -
Rule Jordan 2000 max - Mar lastThu 0:00s 1:00 S
+Rule Jordan 2003 only - Oct 24 0:00s 0 -
+Rule Jordan 2004 only - Oct 15 0:00s 0 -
+Rule Jordan 2005 max - Sep lastFri 0:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Amman 2:23:44 - LMT 1931
2:00 Jordan EE%sT
+
# Kazakhstan
+
# From Paul Eggert (1996-11-22):
-# Andrew Evtichov <evti@chevron.com> (1996-04-13) writes that Kazakhstan
+# Andrew Evtichov (1996-04-13) writes that Kazakhstan
# stayed in sync with Moscow after 1990, and that Aqtobe (formerly Aktyubinsk)
# and Aqtau (formerly Shevchenko) are the largest cities in their zones.
# Guess that Aqtau and Aqtobe diverged in 1995, since that's the first time
# IATA SSIM mentions a third time zone in Kazakhstan.
-#
+
# From Paul Eggert (2001-10-18):
# German Iofis, ELSI, Almaty (2001-10-09) reports that Kazakhstan uses
# RussiaAsia rules, instead of switching at 00:00 as the IATA has it.
@@ -893,7 +988,24 @@ Zone Asia/Amman 2:23:44 - LMT 1931
# - Kazakhstan did not observe DST in 1991.
# - Qyzylorda switched from +5:00 to +6:00 on 1992-01-19 02:00.
# - Oral switched from +5:00 to +4:00 in spring 1989.
+
+# <a href="http://www.kazsociety.org.uk/news/2005/03/30.htm">
+# From Kazakhstan Embassy's News Bulletin #11 (2005-03-21):
+# </a>
+# The Government of Kazakhstan passed a resolution March 15 abolishing
+# daylight saving time citing lack of economic benefits and health
+# complications coupled with a decrease in productivity.
#
+# From Branislav Kojic (in Astana) via Gwillim Law (2005-06-28):
+# ... what happened was that the former Kazakhstan Eastern time zone
+# was "blended" with the Central zone. Therefore, Kazakhstan now has
+# two time zones, and difference between them is one hour. The zone
+# closer to UTC is the former Western zone (probably still called the
+# same), encompassing four provinces in the west: Aqtobe, Atyrau,
+# Mangghystau, and West Kazakhstan. The other zone encompasses
+# everything else.... I guess that would make Kazakhstan time zones
+# de jure UTC+5 and UTC+6 respectively.
+
#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
#
@@ -902,7 +1014,8 @@ Zone Asia/Almaty 5:07:48 - LMT 1924 May 2 # or Alma-Ata
5:00 - ALMT 1930 Jun 21 # Alma-Ata Time
6:00 RussiaAsia ALM%sT 1991
6:00 - ALMT 1992
- 6:00 RussiaAsia ALM%sT
+ 6:00 RussiaAsia ALM%sT 2005 Mar 15
+ 6:00 - ALMT
# Qyzylorda (aka Kyzylorda, Kizilorda, Kzyl-Orda, etc.)
Zone Asia/Qyzylorda 4:21:52 - LMT 1924 May 2
4:00 - KIZT 1930 Jun 21 # Kizilorda Time
@@ -912,7 +1025,8 @@ Zone Asia/Qyzylorda 4:21:52 - LMT 1924 May 2
5:00 RussiaAsia KIZ%sT 1991
5:00 - KIZT 1991 Dec 16 # independence
5:00 - QYZT 1992 Jan 19 2:00
- 6:00 RussiaAsia QYZ%sT
+ 6:00 RussiaAsia QYZ%sT 2005 Mar 15
+ 6:00 - QYZT
# Aqtobe (aka Aktobe, formerly Akt'ubinsk)
Zone Asia/Aqtobe 3:48:40 - LMT 1924 May 2
4:00 - AKTT 1930 Jun 21 # Aktyubinsk Time
@@ -921,7 +1035,8 @@ Zone Asia/Aqtobe 3:48:40 - LMT 1924 May 2
6:00 - AKTT 1982 Apr 1
5:00 RussiaAsia AKT%sT 1991
5:00 - AKTT 1991 Dec 16 # independence
- 5:00 RussiaAsia AQT%sT # Aqtobe Time
+ 5:00 RussiaAsia AQT%sT 2005 Mar 15 # Aqtobe Time
+ 5:00 - AQTT
# Mangghystau
# Aqtau was not founded until 1963, but it represents an inhabited region,
# so include time stamps before 1963.
@@ -933,7 +1048,8 @@ Zone Asia/Aqtau 3:21:04 - LMT 1924 May 2
5:00 RussiaAsia SHE%sT 1991
5:00 - SHET 1991 Dec 16 # independence
5:00 RussiaAsia AQT%sT 1995 Mar lastSun 2:00 # Aqtau Time
- 4:00 RussiaAsia AQT%sT
+ 4:00 RussiaAsia AQT%sT 2005 Mar 15
+ 5:00 - AQTT
# West Kazakhstan
Zone Asia/Oral 3:25:24 - LMT 1924 May 2 # or Ural'sk
4:00 - URAT 1930 Jun 21 # Ural'sk time
@@ -943,21 +1059,33 @@ Zone Asia/Oral 3:25:24 - LMT 1924 May 2 # or Ural'sk
5:00 RussiaAsia URA%sT 1989 Mar 26 2:00
4:00 RussiaAsia URA%sT 1991
4:00 - URAT 1991 Dec 16 # independence
- 4:00 RussiaAsia ORA%sT # Oral Time
+ 4:00 RussiaAsia ORA%sT 2005 Mar 15 # Oral Time
+ 5:00 - ORAT
# Kyrgyzstan (Kirgizstan)
# Transitions through 1991 are from Shanks.
+
+# From Paul Eggert (2005-08-15):
+# According to an article dated today in the Kyrgyzstan Development Gateway
+# <http://eng.gateway.kg/cgi-bin/page.pl?id=1&story_name=doc9979.shtml>
+# Kyrgyzstan is canceling the daylight saving time system. I take the article
+# to mean that they will leave their clocks at 6 hours ahead of UTC.
+# From Malik Abdugaliev (2005-09-21):
+# Our government cancels daylight saving time 6th of August 2005.
+# From 2005-08-12 our GMT-offset is +6, w/o any daylight saving.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-Rule Kirgiz 1992 1996 - Apr Sun>=7 0:00s 1:00 S
-Rule Kirgiz 1992 1996 - Sep lastSun 0:00 0 -
-Rule Kirgiz 1997 max - Mar lastSun 2:30 1:00 S
-Rule Kirgiz 1997 max - Oct lastSun 2:30 0 -
+Rule Kyrgyz 1992 1996 - Apr Sun>=7 0:00s 1:00 S
+Rule Kyrgyz 1992 1996 - Sep lastSun 0:00 0 -
+Rule Kyrgyz 1997 2005 - Mar lastSun 2:30 1:00 S
+Rule Kyrgyz 1997 2004 - Oct lastSun 2:30 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Bishkek 4:58:24 - LMT 1924 May 2
5:00 - FRUT 1930 Jun 21 # Frunze Time
6:00 RussiaAsia FRU%sT 1991 Mar 31 2:00s
5:00 1:00 FRUST 1991 Aug 31 2:00 # independence
- 5:00 Kirgiz KG%sT # Kirgizstan Time
+ 5:00 Kyrgyz KG%sT 2005 Aug 12 # Kyrgyzstan Time
+ 6:00 - KGT
###############################################################################
@@ -1116,7 +1244,7 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # Male
#
# [The province of Selenge is omitted from the above lists.]
-# From Ganbold Ts., Ulaanbaatar <ganbold@micom.mng.net> (2004-04-17):
+# From Ganbold Ts., Ulaanbaatar (2004-04-17):
# Daylight saving occurs at 02:00 local time last Saturday of March.
# It will change back to normal at 02:00 local time last Saturday of
# September.... As I remember this rule was changed in 2001.
@@ -1125,6 +1253,24 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # Male
# For now, assume Rives McDow's informant got confused about Friday vs
# Saturday, and that his 2001 dates should have 1 added to them.
+# From Paul Eggert (2005-07-26):
+# We have wildly conflicting information about Mongolia's time zones.
+# Bill Bonnet (2005-05-19) reports that the US Embassy in Ulaanbaatar says
+# there is only one time zone and that DST is observed, citing Microsoft
+# Windows XP as the source. Risto Nykanen (2005-05-16) reports that
+# travelmongolia.org says there are two time zones (UTC+7, UTC+8) with no DST.
+# Oscar van Vlijmen (2005-05-20) reports that the Mongolian Embassy in
+# Washington, DC says there are two time zones, with DST observed.
+# He also found
+# <http://ubpost.mongolnews.mn/index.php?subaction=showcomments&id=1111634894&archive=&start_from=&ucat=1&>
+# which also says that there is DST, and which has a comment by "Toddius"
+# (2005-03-31 06:05 +0700) saying "Mongolia actually has 3.5 time zones.
+# The West (OLGII) is +7 GMT, most of the country is ULAT is +8 GMT
+# and some Eastern provinces are +9 GMT but Sukhbaatar Aimag is SUHK +8.5 GMT.
+# The SUKH timezone is new this year, it is one of the few things the
+# parliament passed during the tumultuous winter session."
+# For now, let's ignore this information, until we have more confirmation.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S
Rule Mongol 1983 only - Oct 1 0:00 0 -
@@ -1216,7 +1362,7 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# Palestine
-# From Amos Shapir <amos@nsof.co.il> (1998-02-15):
+# From Amos Shapir (1998-02-15):
#
# From 1917 until 1948-05-15, all of Palestine, including the parts now
# known as the Gaza Strip and the West Bank, was under British rule.
@@ -1288,6 +1434,15 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# For now, let's assume that the spring switch was at 24:00,
# and that they switch at 0:00 on the 3rd Fridays of April and October.
+# From Paul Eggert (2005-11-22):
+# Starting 2004 transitions are from Steffen Thorsen's web site timeanddate.com.
+
+# From Steffen Thorsen (2005-11-23):
+# A user from Gaza reported that Gaza made the change early because of
+# the Ramadan. Next year Ramadan will be even earlier, so I think
+# there is a good chance next year's end date will be around two weeks
+# earlier--the same goes for Jordan.
+
# The rules for Egypt are stolen from the `africa' file.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule EgyptAsia 1957 only - May 10 0:00 1:00 S
@@ -1298,7 +1453,9 @@ Rule EgyptAsia 1959 1965 - Sep 30 3:00 0 -
Rule EgyptAsia 1966 only - Oct 1 3:00 0 -
Rule Palestine 1999 max - Apr Fri>=15 0:00 1:00 S
-Rule Palestine 1999 max - Oct Fri>=15 0:00 0 -
+Rule Palestine 1999 2003 - Oct Fri>=15 0:00 0 -
+Rule Palestine 2004 only - Oct 1 1:00 0 -
+Rule Palestine 2005 max - Oct 4 2:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Gaza 2:17:52 - LMT 1900 Oct
@@ -1478,7 +1635,7 @@ Zone Asia/Tashkent 4:37:12 - LMT 1924 May 2
5:00 - UZT
# Vietnam
-# From Paul Eggert <eggert@twinsun.com> (1993-11-18):
+# From Paul Eggert (1993-11-18):
# Saigon's official name is Thanh-Pho Ho Chi Minh, but it's too long.
# We'll stick with the traditional name for now.
# From Shanks:
diff --git a/timezone/australasia b/timezone/australasia
index d8a8e36..70b8455 100644
--- a/timezone/australasia
+++ b/timezone/australasia
@@ -1,4 +1,6 @@
-# @(#)australasia 7.69
+# @(#)australasia 8.1
+# <pre>
+
# This file also includes Pacific islands.
# Notes are at the end of this file
@@ -38,7 +40,7 @@ Zone Australia/Perth 7:43:24 - LMT 1895 Dec
8:00 - WST
# Queensland
#
-# From Alex Livingston <alex@agsm.unsw.edu.au> (1996-11-01):
+# From Alex Livingston (1996-11-01):
# I have heard or read more than once that some resort islands off the coast
# of Queensland chose to keep observing daylight-saving time even after
# Queensland ceased to.
@@ -77,7 +79,9 @@ Rule AS 1991 only - Mar Sun>=1 2:00s 0 -
Rule AS 1992 only - Mar Sun>=18 2:00s 0 -
Rule AS 1993 only - Mar Sun>=1 2:00s 0 -
Rule AS 1994 only - Mar Sun>=18 2:00s 0 -
-Rule AS 1995 max - Mar lastSun 2:00s 0 -
+Rule AS 1995 2005 - Mar lastSun 2:00s 0 -
+Rule AS 2006 only - Apr Sun>=1 2:00s 0 -
+Rule AS 2007 max - Mar lastSun 2:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Australia/Adelaide 9:14:20 - LMT 1895 Feb
9:00 - CST 1899 May
@@ -85,6 +89,11 @@ Zone Australia/Adelaide 9:14:20 - LMT 1895 Feb
9:30 AS CST
# Tasmania
+#
+# From Paul Eggert (2005-08-16):
+# <http://www.bom.gov.au/climate/averages/tables/dst_times.shtml>
+# says King Island didn't observe DST from WWII until late 1971.
+#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule AT 1967 only - Oct Sun>=1 2:00s 1:00 -
Rule AT 1968 only - Mar lastSun 2:00s 0 -
@@ -99,15 +108,22 @@ Rule AT 1987 1990 - Mar Sun>=15 2:00s 0 -
Rule AT 1987 only - Oct Sun>=22 2:00s 1:00 -
Rule AT 1988 1990 - Oct lastSun 2:00s 1:00 -
Rule AT 1991 1999 - Oct Sun>=1 2:00s 1:00 -
-Rule AT 1991 max - Mar lastSun 2:00s 0 -
+Rule AT 1991 2005 - Mar lastSun 2:00s 0 -
Rule AT 2000 only - Aug lastSun 2:00s 1:00 -
Rule AT 2001 max - Oct Sun>=1 2:00s 1:00 -
+Rule AT 2006 only - Apr Sun>=1 2:00s 0 -
+Rule AT 2007 max - Mar lastSun 2:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Australia/Hobart 9:49:16 - LMT 1895 Sep
10:00 - EST 1916 Oct 1 2:00
10:00 1:00 EST 1917 Feb
10:00 Aus EST 1967
10:00 AT EST
+Zone Australia/Currie 9:35:28 - LMT 1895 Sep
+ 10:00 - EST 1916 Oct 1 2:00
+ 10:00 1:00 EST 1917 Feb
+ 10:00 Aus EST 1971 Jul
+ 10:00 AT EST
# Victoria
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
@@ -118,9 +134,11 @@ Rule AV 1986 1990 - Mar Sun>=15 2:00s 0 -
Rule AV 1986 1987 - Oct Sun>=15 2:00s 1:00 -
Rule AV 1988 1999 - Oct lastSun 2:00s 1:00 -
Rule AV 1991 1994 - Mar Sun>=1 2:00s 0 -
-Rule AV 1995 max - Mar lastSun 2:00s 0 -
+Rule AV 1995 2005 - Mar lastSun 2:00s 0 -
Rule AV 2000 only - Aug lastSun 2:00s 1:00 -
Rule AV 2001 max - Oct lastSun 2:00s 1:00 -
+Rule AV 2006 only - Apr Sun>=1 2:00s 0 -
+Rule AV 2007 max - Mar lastSun 2:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Australia/Melbourne 9:39:52 - LMT 1895 Feb
10:00 Aus EST 1971
@@ -137,9 +155,11 @@ Rule AN 1986 1989 - Mar Sun>=15 2:00s 0 -
Rule AN 1986 only - Oct 19 2:00s 1:00 -
Rule AN 1987 1999 - Oct lastSun 2:00s 1:00 -
Rule AN 1990 1995 - Mar Sun>=1 2:00s 0 -
-Rule AN 1996 max - Mar lastSun 2:00s 0 -
+Rule AN 1996 2005 - Mar lastSun 2:00s 0 -
Rule AN 2000 only - Aug lastSun 2:00s 1:00 -
Rule AN 2001 max - Oct lastSun 2:00s 1:00 -
+Rule AN 2006 only - Apr Sun>=1 2:00s 0 -
+Rule AN 2007 max - Mar lastSun 2:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Australia/Sydney 10:04:52 - LMT 1895 Feb
10:00 Aus EST 1971
@@ -160,9 +180,11 @@ Rule LH 1986 1989 - Mar Sun>=15 2:00 0 -
Rule LH 1986 only - Oct 19 2:00 0:30 -
Rule LH 1987 1999 - Oct lastSun 2:00 0:30 -
Rule LH 1990 1995 - Mar Sun>=1 2:00 0 -
-Rule LH 1996 max - Mar lastSun 2:00 0 -
+Rule LH 1996 2005 - Mar lastSun 2:00 0 -
Rule LH 2000 only - Aug lastSun 2:00 0:30 -
Rule LH 2001 max - Oct lastSun 2:00 0:30 -
+Rule LH 2006 only - Apr Sun>=1 2:00 0 -
+Rule LH 2007 max - Mar lastSun 2:00 0 -
Zone Australia/Lord_Howe 10:36:20 - LMT 1895 Feb
10:00 - EST 1981 Mar
10:30 LH LHST
@@ -199,9 +221,11 @@ Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua
-10:00 Cook CK%sT
# Cocos
-# From USNO (1989):
+# These islands were ruled by the Ross family from about 1830 to 1978.
+# We don't know when standard time was introduced; for now, we guess 1900.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Indian/Cocos 6:30 - CCT # Cocos Islands Time
+Zone Indian/Cocos 6:27:40 - LMT 1900
+ 6:30 - CCT # Cocos Islands Time
# Fiji
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
@@ -262,9 +286,6 @@ Zone Pacific/Kwajalein 11:09:20 - LMT 1901
# Micronesia
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone Pacific/Yap 9:12:32 - LMT 1901 # Colonia
- 9:00 - YAPT 1969 Oct # Yap Time
- 10:00 - YAPT
Zone Pacific/Truk 10:07:08 - LMT 1901
10:00 - TRUT # Truk Time
Zone Pacific/Ponape 10:32:52 - LMT 1901 # Kolonia
@@ -381,11 +402,11 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5
-11:00 - BST 1983 Nov 30 # B=Bering
-11:00 - SST # S=Samoa
-# W Samoa
+# Samoa
Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5
-11:26:56 - LMT 1911
-11:30 - SAMT 1950 # Samoa Time
- -11:00 - WST # W Samoa Time
+ -11:00 - WST # Samoa Time
# Solomon Is
# excludes Bougainville, for which see Papua New Guinea
@@ -434,6 +455,17 @@ Zone Pacific/Johnston -10:00 - HST
# uninhabited
# Midway
+#
+# From Mark Brader (2005-01-23):
+# [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies,
+# published 1994 by Paladwr Press, McLean, VA, USA; ISBN 0-9626483-5-3]
+# reproduced a Pan American Airways timeables from 1936, for their weekly
+# "Orient Express" flights between San Francisco and Manila, and connecting
+# flights to Chicago and the US East Coast. As it uses some time zone
+# designations that I've never seen before:....
+# Fri. 6:30A Lv. HONOLOLU (Pearl Harbor), H.I. H.L.T. Ar. 5:30P Sun.
+# " 3:00P Ar. MIDWAY ISLAND . . . . . . . . . M.L.T. Lv. 6:00A "
+#
Zone Pacific/Midway -11:49:28 - LMT 1901
-11:00 - NST 1956 Jun 3
-11:00 1:00 NDT 1956 Sep 2
@@ -475,7 +507,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# go ahead and edit the file (and please send any changes to
# tz@elsie.nci.nih.gov for general use in the future).
-# From Paul Eggert <eggert@twinsun.com> (1999-10-29):
+# From Paul Eggert (1999-10-29):
# A good source for time zone historical data outside the U.S. is
# Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999).
@@ -521,9 +553,15 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# Australia
-# <a href="http://www.dstc.qut.edu.au/DST/marg/daylight.html">
-# Australia's Daylight Saving Times
-# </a>, by Margaret Turner, summarizes daylight saving issues in Australia.
+# From Paul Eggert (2005-12-08):
+# <a href="http://www.bom.gov.au/climate/averages/tables/dst_times.shtml">
+# Implementation Dates of Daylight Saving Time within Australia
+# </a> summarizes daylight saving issues in Australia.
+
+# From Arthur David Olson (2005-12-12):
+# <a href="http://www.lawlink.nsw.gov.au/lawlink/Corporate/ll_agdinfo.nsf/pages/community_relations_daylight_saving">
+# Lawlink NSW:Daylight Saving in New South Wales
+# </a> covers New South Wales in particular.
# From John Mackin (1991-03-06):
# We in Australia have _never_ referred to DST as `daylight' time.
@@ -632,13 +670,13 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# From Paul Eggert (1995-12-19):
# Shanks reports 2:00 for all autumn changes in Australia and New Zealand.
-# Mark Prior <mrp@itd.adelaide.edu.au> writes that his newspaper
+# Mark Prior writes that his newspaper
# reports that NSW's fall 1995 change will occur at 2:00,
# but Robert Elz says it's been 3:00 in Victoria since 1970
# and perhaps the newspaper's `2:00' is referring to standard time.
# For now we'll continue to assume 2:00s for changes since 1960.
-# From Eric Ulevik <eau@zip.com.au> (1998-01-05):
+# From Eric Ulevik (1998-01-05):
#
# Here are some URLs to Australian time legislation. These URLs are stable,
# and should probably be included in the data file. There are probably more
@@ -657,6 +695,24 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# Standard Time Act, 1898
# </a>
+# From David Grosz (2005-06-13):
+# It was announced last week that Daylight Saving would be extended by
+# one week next year to allow for the 2006 Commonwealth Games.
+# Daylight Saving is now to end for next year only on the first Sunday
+# in April instead of the last Sunday in March.
+#
+# From Gwillim Law (2005-06-14):
+# I did some Googling and found that all of those states (and territory) plan
+# to extend DST together in 2006.
+# ACT: http://www.cmd.act.gov.au/mediareleases/fileread.cfm?file=86.txt
+# New South Wales: http://www.thecouriermail.news.com.au/common/story_page/0,5936,15538869%255E1702,00.html
+# South Australia: http://www.news.com.au/story/0,10117,15555031-1246,00.html
+# Tasmania: http://www.media.tas.gov.au/release.php?id=14772
+# Victoria: I wasn't able to find anything separate, but the other articles
+# allude to it.
+# But not Queensland
+# http://www.news.com.au/story/0,10117,15564030-1248,00.html.
+
# Northern Territory
# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06):
@@ -843,7 +899,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# 1994 was at +0930 as John Connolly's customer seems to assert, then I can
# only conclude that the actual rule is more complicated....
-# From John Warburton <jwarb@SACBH.com.au> (1994-10-07):
+# From John Warburton (1994-10-07):
# The new Daylight Savings dates for South Australia ...
# was gazetted in the Government Hansard on Sep 26 1994....
# start on last Sunday in October and end in last sunday in March.
@@ -903,7 +959,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# From Arthur David Olson:
# New South Wales and subjurisdictions have their own ideas of a fun time.
-# Based on law library research by John Mackin (john@basser.cs.su.oz),
+# Based on law library research by John Mackin,
# who notes:
# In Australia, time is not legislated federally, but rather by the
# individual states. Thus, while such terms as ``Eastern Standard Time''
@@ -912,18 +968,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# legislation. This is very important to understand.
# I have researched New South Wales time only...
-# From Paul Eggert (1999-09-27):
-# The Information Service of the Australian National Standards Commission
-# <a href="http://www.nsc.gov.au/InfoServ/Ileaflet/il27.htm">
-# Daylight Saving
-# </a> page (1995-04) has an excellent overall history of Australian DST.
-# The Community Relations Division of the NSW Attorney General's Department
-# publishes a history of daylight saving in NSW. See:
-# <a href="http://www.lawlink.nsw.gov.au/crd.nsf/pages/time2">
-# Lawlink NSW: Daylight Saving in New South Wales
-# </a>
-
-# From Eric Ulevik <eau@ozemail.com.au> (1999-05-26):
+# From Eric Ulevik (1999-05-26):
# DST will start in NSW on the last Sunday of August, rather than the usual
# October in 2000. [See: Matthew Moore,
# <a href="http://www.smh.com.au/news/9905/26/pageone/pageone4.html">
@@ -1000,7 +1045,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# Lord Howe Island
# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06):
-# LHI... [ Courtesy of Pauline Van Winsen.. pauline@Aus ]
+# LHI... [ Courtesy of Pauline Van Winsen ]
# [ Dec 1990 ]
# Lord Howe Island is located off the New South Wales coast, and is half an
# hour ahead of NSW time.
@@ -1040,7 +1085,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# From George Shepherd via Simon Woodhead via Robert Elz (1991-03-06):
# # The Country of New Zealand (Australia's east island -) Gee they hate that!
# # or is Australia the west island of N.Z.
-# # [ courtesy of Geoff Tribble.. Geofft@Aus.. Auckland N.Z. ]
+# # [ courtesy of Geoff Tribble.. Auckland N.Z. ]
# # [ Nov 1990 ]
# ...
# Rule NZ 1974 1988 - Oct lastSun 2:00 1:00 D
@@ -1057,7 +1102,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# From Paul Eggert (1995-12-19);
# Shanks reports 2:00 for all autumn changes in Australia and New Zealand.
-# Robert Uzgalis <buz@cs.aukuni.ac.nz> writes that the New Zealand Daylight
+# Robert Uzgalis writes that the New Zealand Daylight
# Savings Time Order in Council dated 1990-06-18 specifies 2:00 standard
# time on both the first Sunday in October and the third Sunday in March.
# As with Australia, we'll assume the tradition is 2:00s, not 2:00.
@@ -1136,7 +1181,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# Micronesia
-# Alan Eugene Davis <adavis@kuentos.guam.net> writes (1996-03-16),
+# Alan Eugene Davis writes (1996-03-16),
# ``I am certain, having lived there for the past decade, that "Truk"
# (now properly known as Chuuk) ... is in the time zone GMT+10.''
#
@@ -1244,10 +1289,10 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# October to March, which has won approval in principle from the Tongan
# Government.
-# From Steffen Thorsen [straen@thorsen.priv.no] (1999-09-09):
+# From Steffen Thorsen (1999-09-09):
# * Tonga will introduce DST in November
#
-# I was given this link by John Letts <johnletts@earthlink.net>:
+# I was given this link by John Letts:
# <a hef="http://news.bbc.co.uk/hi/english/world/asia-pacific/newsid_424000/424764.stm">
# http://news.bbc.co.uk/hi/english/world/asia-pacific/newsid_424000/424764.stm
# </a>
@@ -1257,7 +1302,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# of UTC as well, but as far as I know Fiji will only be 13 hours ahead
# (12 + 1 hour DST).
-# From Arthur David Olson [arthur_david_olson@nih.gov] (1999-09-20):
+# From Arthur David Olson (1999-09-20):
# According to <a href="http://www.tongaonline.com/news/sept1799.html>
# http://www.tongaonline.com/news/sept1799.html
# </a>:
@@ -1327,12 +1372,30 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# mapmakers redrew the IDL following the boundary of Kiribati. Even that line
# has a rather arbitrary nature. The straight-line boundaries between Pacific
# island nations that are shown on many maps are based on an international
-# convention, but are not legally binding national borders.
-#
-# An Anglo-French Conference on Time-Keeping at Sea (June, 1917) agreed that
-# legal time on the high seas would be zone time, i.e., the standard time at
-# the nearest meridian that is a multiple of fifteen degrees. The date is
+# convention, but are not legally binding national borders.... The date is
# governed by the IDL; therefore, even on the high seas, there may be some
# places as late as fourteen hours later than UTC. And, since the IDL is not
# an international standard, there are some places on the high seas where the
# correct date is ambiguous.
+
+# From Wikipedia <http://en.wikipedia.org/wiki/Time_zone> (2005-08-31):
+# Before 1920, all ships kept local apparent time on the high seas by setting
+# their clocks at night or at the morning sight so that, given the ship's
+# speed and direction, it would be 12 o'clock when the Sun crossed the ship's
+# meridian (12 o'clock = local apparent noon). During 1917, at the
+# Anglo-French Conference on Time-keeping at Sea, it was recommended that all
+# ships, both military and civilian, should adopt hourly standard time zones
+# on the high seas. Whenever a ship was within the territorial waters of any
+# nation it would use that nation's standard time. The captain was permitted
+# to change his ship's clocks at a time of his choice following his ship's
+# entry into another zone time--he often chose midnight. These zones were
+# adopted by all major fleets between 1920 and 1925 but not by many
+# independent merchant ships until World War II.
+
+# From Paul Eggert, using references suggested by Oscar van Vlijmen
+# (2005-03-20):
+#
+# The American Practical Navigator (2002)
+# <http://pollux.nss.nima.mil/pubs/pubs_j_apn_sections.html?rid=187>
+# talks only about the 180-degree meridian with respect to ships in
+# international waters; it ignores the international date line.
diff --git a/timezone/backward b/timezone/backward
index 6e118c2..66fbf30 100644
--- a/timezone/backward
+++ b/timezone/backward
@@ -1,27 +1,31 @@
-# @(#)backward 7.26
+# @(#)backward 8.1
# This file provides links between current names for time zones
# and their old names. Many names changed in late 1993.
+Link Africa/Bamako Africa/Timbuktu
+Link America/Argentina/Catamarca America/Argentina/ComodRivadavia
Link America/Adak America/Atka
Link America/Argentina/Buenos_Aires America/Buenos_Aires
Link America/Argentina/Catamarca America/Catamarca
Link America/Argentina/Cordoba America/Cordoba
Link America/Tijuana America/Ensenada
-Link America/Indianapolis America/Fort_Wayne
+Link America/Indiana/Indianapolis America/Fort_Wayne
+Link America/Indiana/Indianapolis America/Indianapolis
Link America/Argentina/Jujuy America/Jujuy
Link America/Indiana/Knox America/Knox_IN
+Link America/Kentucky/Louisville America/Louisville
Link America/Argentina/Mendoza America/Mendoza
Link America/Rio_Branco America/Porto_Acre
-Link America/Cordoba America/Rosario
+Link America/Argentina/Cordoba America/Rosario
Link America/St_Thomas America/Virgin
Link Asia/Ashgabat Asia/Ashkhabad
Link Asia/Chongqing Asia/Chungking
Link Asia/Dhaka Asia/Dacca
Link Asia/Macau Asia/Macao
-Link Asia/Makassar Asia/Ujung_Pandang
Link Asia/Jerusalem Asia/Tel_Aviv
Link Asia/Thimphu Asia/Thimbu
+Link Asia/Makassar Asia/Ujung_Pandang
Link Asia/Ulaanbaatar Asia/Ulan_Bator
Link Australia/Sydney Australia/ACT
Link Australia/Sydney Australia/Canberra
@@ -34,7 +38,7 @@ Link Australia/Hobart Australia/Tasmania
Link Australia/Melbourne Australia/Victoria
Link Australia/Perth Australia/West
Link Australia/Broken_Hill Australia/Yancowinna
-Link America/Porto_Acre Brazil/Acre
+Link America/Rio_Branco Brazil/Acre
Link America/Noronha Brazil/DeNoronha
Link America/Sao_Paulo Brazil/East
Link America/Manaus Brazil/West
@@ -52,13 +56,14 @@ Link Pacific/Easter Chile/EasterIsland
Link America/Havana Cuba
Link Africa/Cairo Egypt
Link Europe/Dublin Eire
+Link Europe/London Europe/Belfast
Link Europe/Chisinau Europe/Tiraspol
Link Europe/London GB
Link Europe/London GB-Eire
-Link Etc/GMT+0 GMT+0
-Link Etc/GMT-0 GMT-0
-Link Etc/GMT0 GMT0
-Link Etc/Greenwich Greenwich
+Link Etc/GMT GMT+0
+Link Etc/GMT GMT-0
+Link Etc/GMT GMT0
+Link Etc/GMT Greenwich
Link Asia/Hong_Kong Hongkong
Link Atlantic/Reykjavik Iceland
Link Asia/Tehran Iran
@@ -70,13 +75,14 @@ Link Africa/Tripoli Libya
Link America/Tijuana Mexico/BajaNorte
Link America/Mazatlan Mexico/BajaSur
Link America/Mexico_City Mexico/General
-Link America/Shiprock Navajo
Link Pacific/Auckland NZ
Link Pacific/Chatham NZ-CHAT
+Link America/Denver Navajo
+Link Asia/Shanghai PRC
Link Pacific/Pago_Pago Pacific/Samoa
+Link Pacific/Truk Pacific/Yap
Link Europe/Warsaw Poland
Link Europe/Lisbon Portugal
-Link Asia/Shanghai PRC
Link Asia/Taipei ROC
Link Asia/Seoul ROK
Link Asia/Singapore Singapore
@@ -86,7 +92,7 @@ Link America/Anchorage US/Alaska
Link America/Adak US/Aleutian
Link America/Phoenix US/Arizona
Link America/Chicago US/Central
-Link America/Indianapolis US/East-Indiana
+Link America/Indiana/Indianapolis US/East-Indiana
Link America/New_York US/Eastern
Link Pacific/Honolulu US/Hawaii
Link America/Indiana/Knox US/Indiana-Starke
@@ -95,6 +101,6 @@ Link America/Denver US/Mountain
Link America/Los_Angeles US/Pacific
Link Pacific/Pago_Pago US/Samoa
Link Etc/UTC UTC
-Link Etc/Universal Universal
+Link Etc/UTC Universal
Link Europe/Moscow W-SU
-Link Etc/Zulu Zulu
+Link Etc/UTC Zulu
diff --git a/timezone/checktab.awk b/timezone/checktab.awk
index 6a2d19a..6d53214 100644
--- a/timezone/checktab.awk
+++ b/timezone/checktab.awk
@@ -1,8 +1,8 @@
# Check tz tables for consistency.
-# @(#)checktab.awk 1.6
+# @(#)checktab.awk 1.7
-# Contributed by Paul Eggert <eggert@twinsun.com>.
+# Contributed by Paul Eggert.
BEGIN {
FS = "\t"
diff --git a/timezone/etcetera b/timezone/etcetera
index f87a76e..cddbe8a 100644
--- a/timezone/etcetera
+++ b/timezone/etcetera
@@ -1,10 +1,11 @@
-# @(#)etcetera 7.11
+# @(#)etcetera 8.1
# These entries are mostly present for historical reasons, so that
# people in areas not otherwise covered by the tz files could "zic -l"
# to a time zone that was right for their area. These days, the
-# tz files cover almost all the inhabited world, so there's little
-# need now for the entries that are not on UTC.
+# tz files cover almost all the inhabited world, and the only practical
+# need now for the entries that are not on UTC are for ships at sea
+# that cannot use POSIX TZ settings.
Zone Etc/GMT 0 - GMT
Zone Etc/UTC 0 - UTC
diff --git a/timezone/europe b/timezone/europe
index eeb114f..54146d7 100644
--- a/timezone/europe
+++ b/timezone/europe
@@ -1,10 +1,11 @@
-# @(#)europe 7.88
+# @(#)europe 8.1
+# <pre>
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
# tz@elsie.nci.nih.gov for general use in the future).
-# From Paul Eggert <eggert@twinsun.com> (1999-10-29):
+# From Paul Eggert (1999-10-29):
# A good source for time zone historical data outside the U.S. is
# Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999).
@@ -55,7 +56,7 @@
# A reliable and entertaining source about time zones, especially in Britain,
# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
-# From Peter Ilieve <peter@memex.co.uk> (1994-12-04),
+# From Peter Ilieve (1994-12-04),
# The original six [EU members]: Belgium, France, (West) Germany, Italy,
# Luxembourg, the Netherlands.
# Plus, from 1 Jan 73: Denmark, Ireland, United Kingdom.
@@ -81,7 +82,7 @@
# Britain (United Kingdom) and Ireland (Eire)
-# From Peter Ilieve <peter@memex.co.uk> (1994-07-06):
+# From Peter Ilieve (1994-07-06):
#
# On 17 Jan 1994 the Independent, a UK quality newspaper, had a piece about
# historical vistas along the Thames in west London. There was a photo
@@ -102,7 +103,7 @@
#
# [This yields GMTOFF = -0:01:15 for London LMT in the 18th century.]
-# From Paul Eggert <eggert@twinsun.com> (1993-11-18):
+# From Paul Eggert (1993-11-18):
#
# Howse writes that Britain was the first country to use standard time.
# The railways cared most about the inconsistencies of local mean time,
@@ -168,12 +169,12 @@
# known as "British" Summer Time in all parts of the United Kingdom.
# Date: 4 Jan 89 08:57:25 GMT (Wed)
-# From: Jonathan Leffler <nih-csl!uunet!mcvax!sphinx.co.uk!john>
+# From: Jonathan Leffler
# [British Summer Time] is fixed annually by Act of Parliament.
# If you can predict what Parliament will do, you should be in
# politics making a fortune, not computing.
-# From Chris Carrier <72157.3334@CompuServe.COM> (1996-06-14):
+# From Chris Carrier (1996-06-14):
# I remember reading in various wartime issues of the London Times the
# acronym BDST for British Double Summer Time. Look for the published
# time of sunrise and sunset in The Times, when BDST was in effect, and
@@ -204,15 +205,15 @@
# and follows the more usual convention of putting the location name first,
# so we use `BDST'.
-# Peter Ilieve <peter@aldie.co.uk> (1998-04-19) described at length
+# Peter Ilieve (1998-04-19) described at length
# the history of summer time legislation in the United Kingdom.
-# Since 1998 Joseph S. Myers <jsm28@cam.ac.uk> has been updating
+# Since 1998 Joseph S. Myers has been updating
# and extending this list, which can be found in
# <a href="http://student.cusu.cam.ac.uk/~jsm28/british-time/">
# History of legal time in Britain
# </a>
-# From Joseph S. Myers <jsm28@cam.ac.uk> (1998-01-06):
+# From Joseph S. Myers (1998-01-06):
#
# The legal time in the UK outside of summer time is definitely GMT, not UTC;
# see Lord Tanlaw's speech
@@ -255,6 +256,35 @@
# "Timeball on the ballast office is down. Dunsink time."
# -- James Joyce, Ulysses
+# From Joseph S. Myers (2005-01-26):
+# Irish laws are available online at www.irishstatutebook.ie. These include
+# various relating to legal time, for example:
+#
+# ZZA13Y1923.html ZZA12Y1924.html ZZA8Y1925.html ZZSIV20PG1267.html
+#
+# ZZSI71Y1947.html ZZSI128Y1948.html ZZSI23Y1949.html ZZSI41Y1950.html
+# ZZSI27Y1951.html ZZSI73Y1952.html
+#
+# ZZSI11Y1961.html ZZSI232Y1961.html ZZSI182Y1962.html
+# ZZSI167Y1963.html ZZSI257Y1964.html ZZSI198Y1967.html
+# ZZA23Y1968.html ZZA17Y1971.html
+#
+# ZZSI67Y1981.html ZZSI212Y1982.html ZZSI45Y1986.html
+# ZZSI264Y1988.html ZZSI52Y1990.html ZZSI371Y1992.html
+# ZZSI395Y1994.html ZZSI484Y1997.html ZZSI506Y2001.html
+#
+# [These are all relative to the root, e.g., the first is
+# <http://www.irishstatutebook.ie/ZZA13Y1923.html>.]
+#
+# (These are those I found, but there could be more. In any case these
+# should allow various updates to the comments in the europe file to cover
+# the laws applicable in Ireland.)
+#
+# (Note that the time in the Republic of Ireland since 1968 has been defined
+# in terms of standard time being GMT+1 with a period of winter time when it
+# is GMT, rather than standard time being GMT with a period of summer time
+# being GMT+1.)
+
# From Paul Eggert (1999-03-28):
# Clive Feather (<news:859845706.26043.0@office.demon.net>, 1997-03-31)
# reports that Folkestone (Cheriton) Shuttle Terminal uses Concession Time
@@ -393,13 +423,6 @@ Zone Europe/London -0:01:15 - LMT 1847 Dec 1
1:00 - BST 1971 Oct 31 2:00u
0:00 GB-Eire %s 1996
0:00 EU GMT/BST
-Zone Europe/Belfast -0:23:40 - LMT 1880 Aug 2
- -0:25:21 - DMT 1916 May 21 2:00 # Dublin/Dunsink MT
- -0:25:21 1:00 IST 1916 Oct 1 2:00s # Irish Summer Time
- 0:00 GB-Eire %s 1968 Oct 27
- 1:00 - BST 1971 Oct 31 2:00u
- 0:00 GB-Eire %s 1996
- 0:00 EU GMT/BST
Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2
-0:25:21 - DMT 1916 May 21 2:00
-0:25:21 1:00 IST 1916 Oct 1 2:00s
@@ -507,7 +530,7 @@ Zone EET 2:00 EU EE%sT
# Previous editions of this database used abbreviations like MET DST
# for Central European Summer Time, but this didn't agree with common usage.
-# From Markus Kuhn <mskuhn@unrza3.dialin.rrze.uni-erlangen.de> (1996-07-12):
+# From Markus Kuhn (1996-07-12):
# The official German names ... are
#
# Mitteleuropaeische Zeit (MEZ) = UTC+01:00
@@ -623,7 +646,7 @@ Zone Europe/Minsk 1:50:16 - LMT 1880
# pp 8-9.
# LMT before 1892 was 0:17:30, according to the official journal of Belgium:
# Moniteur Belge, Samedi 30 Avril 1892, N.121.
-# Thanks to Pascal Delmoitie <pascal@belnet.be> for these references.
+# Thanks to Pascal Delmoitie for these references.
# The 1918 rules are listed for completeness; they apply to unoccupied Belgium.
# Assume Brussels switched to WET in 1918 when the armistice took effect.
#
@@ -682,7 +705,7 @@ Zone Europe/Brussels 0:17:30 - LMT 1880
# Bulgaria
#
-# From Plamen Simenov <P.Simeonov@cnsys.bg> via Steffen Thorsen (1999-09-09):
+# From Plamen Simenov via Steffen Thorsen (1999-09-09):
# A document of Government of Bulgaria (No.94/1997) says:
# EET --> EETDST is in 03:00 Local time in last Sunday of March ...
# EETDST --> EET is in 04:00 Local time in last Sunday of October
@@ -708,7 +731,7 @@ Zone Europe/Sofia 1:33:16 - LMT 1880
# see Serbia and Montenegro
# Cyprus
-# See the `asia' file.
+# Please see the `asia' file for Asia/Nicosia.
# Czech Republic
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
@@ -727,6 +750,40 @@ Zone Europe/Prague 0:57:44 - LMT 1850
1:00 EU CE%sT
# Denmark, Faeroe Islands, and Greenland
+
+# From Jesper Norgaard Welen (2005-04-26):
+# http://www.hum.aau.dk/~poe/tid/tine/DanskTid.htm says that the law
+# [introducing standard time] was in effect from 1894-01-01....
+# The page http://www.retsinfo.dk/_GETDOCI_/ACCN/A18930008330-REGL
+# confirms this, and states that the law was put forth 1893-03-29.
+#
+# The EU treaty with effect from 1973:
+# http://www.retsinfo.dk/_GETDOCI_/ACCN/A19722110030-REGL
+#
+# This provoked a new law from 1974 to make possible summer time changes
+# in subsequenet decrees with the law
+# http://www.retsinfo.dk/_GETDOCI_/ACCN/A19740022330-REGL
+#
+# It seems however that no decree was set forward until 1980. I have
+# not found any decree, but in another related law, the effecting DST
+# changes are stated explicitly to be from 1980-04-06 at 02:00 to
+# 1980-09-28 at 02:00. If this is true, this differs slightly from
+# the EU rule in that DST runs to 02:00, not 03:00. We don't know
+# when Denmark began using the EU rule correctly, but we have only
+# confirmation of the 1980-time, so I presume it was correct in 1981:
+# The law is about the management of the extra hour, concerning
+# working hours reported and effect on obligatory-rest rules (which
+# was suspended on that night):
+# http://www.retsinfo.dk/_GETDOCI_/ACCN/C19801120554-REGL
+
+# From Jesper Norgaard Welen (2005-06-11):
+# The Herning Folkeblad (1980-09-26) reported that the night between
+# Saturday and Sunday the clock is set back from three to two.
+
+# From Paul Eggert (2005-06-11):
+# Hence the "02:00" of the 1980 law refers to standard time, not
+# wall-clock time, and so the EU rules were in effect in 1980.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Denmark 1916 only - May 14 23:00 1:00 S
Rule Denmark 1916 only - Sep 30 23:00 0 -
@@ -739,13 +796,10 @@ Rule Denmark 1947 only - May 4 2:00s 1:00 S
Rule Denmark 1947 only - Aug 10 2:00s 0 -
Rule Denmark 1948 only - May 9 2:00s 1:00 S
Rule Denmark 1948 only - Aug 8 2:00s 0 -
-# Whitman also gives 1949 Apr 9 to 1949 Oct 1, and disagrees in minor ways
-# about many of the above dates; go with Shanks.
#
-# For 1894, Shanks says Jan, Whitman Apr; go with Whitman.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Copenhagen 0:50:20 - LMT 1890
- 0:50:20 - CMT 1894 Apr # Copenhagen Mean Time
+ 0:50:20 - CMT 1894 Jan 1 # Copenhagen MT
1:00 Denmark CE%sT 1942 Nov 2 2:00s
1:00 C-Eur CE%sT 1945 Apr 2 2:00
1:00 Denmark CE%sT 1980
@@ -754,6 +808,11 @@ Zone Atlantic/Faeroe -0:27:04 - LMT 1908 Jan 11 # Torshavn
0:00 - WET 1981
0:00 EU WE%sT
#
+# From Paul Eggert (2004-10-31):
+# During World War II, Germany maintained secret manned weather stations in
+# East Greenland and Franz Josef Land, but we don't know their time zones.
+# My source for this is Wilhelm Dege's book mentioned under Svalbard.
+#
# From Paul Eggert (1996-11-22):
# Greenland joined the EU as part of Denmark, obtained home rule on 1979-05-01,
# and left the EU on 1985-02-01. It therefore should have been using EU
@@ -840,12 +899,12 @@ Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik air base
-4:00 Thule A%sT
# Estonia
-# From Peter Ilieve <peter@memex.co.uk> (1994-10-15):
+# From Peter Ilieve (1994-10-15):
# A relative in Tallinn confirms the accuracy of the data for 1989 onwards
# [through 1994] and gives the legal authority for it,
# a regulation of the Government of Estonia, No. 111 of 1989....
#
-# From Peter Ilieve <peter@aldie.co.uk> (1996-10-28):
+# From Peter Ilieve (1996-10-28):
# [IATA SSIM (1992/1996) claims that the Baltic republics switch at 01:00s,
# but a relative confirms that Estonia still switches at 02:00s, writing:]
# ``I do not [know] exactly but there are some little different
@@ -855,7 +914,7 @@ Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik air base
# human physiology. It seems that Estonia maybe will not change to
# summer time next spring.''
-# From Peter Ilieve <peter@aldie.co.uk> (1998-11-04), heavily edited:
+# From Peter Ilieve (1998-11-04), heavily edited:
# <a href="http://trip.rk.ee/cgi-bin/thw?${BASE}=akt&${OOHTML}=rtd&TA=1998&TO=1&AN=1390">
# The 1998-09-22 Estonian time law
# </a>
@@ -904,11 +963,11 @@ Zone Europe/Tallinn 1:39:00 - LMT 1880
# Finland
#
-# From Hannu Strang <chs@apu.fi> (25 Sep 1994 06:03:37 UTC):
+# From Hannu Strang (25 Sep 1994 06:03:37 UTC):
# Well, here in Helsinki we're just changing from summer time to regular one,
# and it's supposed to change at 4am...
#
-# From Paul Eggert <eggert@twinsun.com> (25 Sep 1994):
+# From Paul Eggert (25 Sep 1994):
# Shanks says Finland has switched at 02:00 standard time since 1981.
# Go with Strang instead.
#
@@ -985,7 +1044,7 @@ Rule France 1940 only - Feb 25 2:00 1:00 S
# Dole, Morez, St-Claude, and Collognes (Haute-Savioe).
Rule France 1941 only - May 5 0:00 2:00 M # Midsummer
# Shanks says this transition occurred at Oct 6 1:00,
-# but go with Denis.Excoffier@ens.fr (1997-12-12),
+# but go with Denis Excoffier (1997-12-12),
# who quotes the Ephemerides Astronomiques for 1998 from Bureau des Longitudes
# as saying 5/10/41 22hUT.
Rule France 1941 only - Oct 6 0:00 1:00 S
@@ -1019,7 +1078,7 @@ Zone Europe/Paris 0:09:21 - LMT 1891 Mar 15 0:01
# Germany
-# From Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk> (1998-09-29):
+# From Markus Kuhn (1998-09-29):
# The German time zone web site by the Physikalisch-Technische
# Bundesanstalt contains DST information back to 1916.
# [See tz-link.htm for the URL.]
@@ -1055,6 +1114,11 @@ Zone Europe/Berlin 0:53:28 - LMT 1893 Apr
1:00 Germany CE%sT 1980
1:00 EU CE%sT
+# Georgia
+# Please see the "asia" file for Asia/Tbilisi.
+# Herodotus (Histories, IV.45) says Georgia north of the Phasis (now Rioni)
+# is in Europe. Our reference location Tbilisi is in the Asian part.
+
# Gibraltar
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Gibraltar -0:21:24 - LMT 1880 Aug 2
@@ -1129,7 +1193,7 @@ Zone Europe/Budapest 1:16:20 - LMT 1890 Oct
# Iceland
#
-# From Adam David <adam@veda.is> (1993-11-06):
+# From Adam David (1993-11-06):
# The name of the timezone in Iceland for system / mail / news purposes is GMT.
#
# (1993-12-05):
@@ -1156,7 +1220,7 @@ Zone Europe/Budapest 1:16:20 - LMT 1890 Oct
# might be a reference to the Julian calendar as opposed to Gregorian, or it
# might mean something else (???).
#
-# From Paul Eggert <eggert@twinsun.com> (1999-10-29):
+# From Paul Eggert (1999-10-29):
# The Iceland Almanak, Shanks and Whitman disagree on many points.
# We go with the Almanak, except for one claim from Shanks, namely that
# Reykavik was 21W57 from 1837 to 1908, local mean time before that.
@@ -1272,7 +1336,7 @@ Link Europe/Rome Europe/San_Marino
# Latvia
-# From Liene Kanepe <Liene_Kanepe@lm.gov.lv> (1998-09-17):
+# From Liene Kanepe (1998-09-17):
# I asked about this matter Scientific Secretary of the Institute of Astronomy
# of The University of Latvia Dr. paed Mr. Ilgonis Vilks. I also searched the
@@ -1359,7 +1423,7 @@ Zone Europe/Vaduz 0:38:04 - LMT 1894 Jun
# IATA SSIM (1992/1996) says Lithuania uses W-Eur rules, but since it is
# known to be wrong about Estonia and Latvia, assume it's wrong here too.
-# From Marius Gedminas <mgedmin@pub.osf.lt> (1998-08-07):
+# From Marius Gedminas (1998-08-07):
# I would like to inform that in this year Lithuanian time zone
# (Europe/Vilnius) was changed.
@@ -1466,7 +1530,7 @@ Zone Europe/Malta 0:58:04 - LMT 1893 Nov 2 # Valletta
# on 1991-08-27 (the 1992-01-19 date is that of a Russian decree).
# In early 1992 there was large-scale interethnic violence in the area
# and it's possible that some Russophones continued to observe Moscow time.
-# But moldavizolit@tirastel.md and mk@tirastel.md separately reported via
+# But [two people] separately reported via
# Jesper Norgaard that as of 2001-01-24 Tiraspol was like Chisinau.
# The Tiraspol entry has therefore been removed for now.
@@ -1569,12 +1633,10 @@ Zone Europe/Amsterdam 0:19:32 - LMT 1835
1:00 EU CE%sT
# Norway
+# http://met.no/met/met_lex/q_u/sommertid.html (2004-01) agrees with Shanks.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-# Whitman gives 1916 May 21 - 1916 Oct 21; go with Shanks.
Rule Norway 1916 only - May 22 1:00 1:00 S
Rule Norway 1916 only - Sep 30 0:00 0 -
-# Whitman says DST observed 1935-08-11/1942-11-01, then 1943-03-29/10-04,
-# 1944-04-03/10-02, and 1945-04-01/10-01; go with Shanks.
Rule Norway 1945 only - Apr 2 2:00s 1:00 S
Rule Norway 1945 only - Oct 1 2:00s 0 -
Rule Norway 1959 1964 - Mar Sun>=15 2:00s 1:00 S
@@ -1611,7 +1673,7 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1
# From Paul Eggert (2001-05-01):
#
# Actually, Jan Mayen was never occupied by Germany during World War II,
-# so it must have diverged from Oslo time during the war, as Olso was
+# so it must have diverged from Oslo time during the war, as Oslo was
# keeping Berlin time.
#
# <http://home.no.net/janmayen/history.htm> says that the meteorologists
@@ -1628,7 +1690,7 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1
# <http://www.svalbard.com/SvalbardFAQ.html> says that the Germans were
# expelled on 1942-05-14. However, small parties of Germans did return,
# and according to Wilhelm Dege's book "War North of 80" (1954)
-# <http://www.utpress.utoronto.ca/publishing/rights/dege_warnorthof80.htm>
+# <http://www.ucalgary.ca/UofC/departments/UP/1-55238/1-55238-110-2.html>
# the German armed forces at the Svalbard weather station code-named
# Haudegen did not surrender to the Allies until September 1945.
#
@@ -1647,19 +1709,26 @@ Rule Poland 1944 only - Oct 4 2:00 0 -
# For 1944-1948 Whitman gives the previous day; go with Shanks.
Rule Poland 1945 only - Apr 29 0:00 1:00 S
Rule Poland 1945 only - Nov 1 0:00 0 -
-Rule Poland 1946 only - Apr 14 0:00 1:00 S
-Rule Poland 1946 only - Sep 7 0:00 0 -
-Rule Poland 1947 only - May 4 0:00 1:00 S
-Rule Poland 1947 1948 - Oct Sun>=1 0:00 0 -
-Rule Poland 1948 only - Apr 18 0:00 1:00 S
-# Whitman also gives 1949 Apr 9 - 1949 Oct 1; go with Shanks.
+# For 1946 on the source is Kazimierz Borkowski,
+# Torun Center for Astronomy, Dept. of Radio Astronomy, Nicolaus Copernicus U.,
+# <http://www.astro.uni.torun.pl/~kb/Artykuly/U-PA/Czas2.htm#tth_tAb1>
+# Thanks to Przemyslaw Augustyniak (2005-05-28) for this reference.
+# He also gives these further references:
+# Mon Pol nr 13, poz 162 (1995) <http://www.abc.com.pl/serwis/mp/1995/0162.htm>
+# Druk nr 2180 (2003) <http://www.senat.gov.pl/k5/dok/sejm/053/2180.pdf>
+Rule Poland 1946 only - Apr 14 0:00s 1:00 S
+Rule Poland 1946 only - Oct 7 2:00s 0 -
+Rule Poland 1947 only - May 4 2:00s 1:00 S
+Rule Poland 1947 1949 - Oct Sun>=1 2:00s 0 -
+Rule Poland 1948 only - Apr 18 2:00s 1:00 S
+Rule Poland 1949 only - Apr 10 2:00s 1:00 S
Rule Poland 1957 only - Jun 2 1:00s 1:00 S
Rule Poland 1957 1958 - Sep lastSun 1:00s 0 -
Rule Poland 1958 only - Mar 30 1:00s 1:00 S
Rule Poland 1959 only - May 31 1:00s 1:00 S
Rule Poland 1959 1961 - Oct Sun>=1 1:00s 0 -
Rule Poland 1960 only - Apr 3 1:00s 1:00 S
-Rule Poland 1961 1964 - May Sun>=25 1:00s 1:00 S
+Rule Poland 1961 1964 - May lastSun 1:00s 1:00 S
Rule Poland 1962 1964 - Sep lastSun 1:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Europe/Warsaw 1:24:00 - LMT 1880
@@ -1668,33 +1737,17 @@ Zone Europe/Warsaw 1:24:00 - LMT 1880
2:00 Poland EE%sT 1922 Jun
1:00 Poland CE%sT 1940 Jun 23 2:00
1:00 C-Eur CE%sT 1944 Oct
- 1:00 Poland CE%sT 1977 Apr 3 1:00
- 1:00 W-Eur CE%sT 1999
-# IATA SSIM (1991/1996) gives EU rules, but the _The Warsaw Voice_
-# <a href="http://www.warsawvoice.com.pl/v361/NewsInBrief.shtml">
-# http://www.warsawvoice.com/pl/v361/NewsInBrief.shtml (1995-09-24)
-# </a>
-# says the autumn 1995 switch was at 02:00.
-# Stick with W-Eur for now.
-#
-# From Marcin.Kasperski@softax.com.pl (1999-06-10):
-# According to my colleagues someone recently decided, that Poland would
-# follow European Union regulations, so - I think - the matter is not
-# worth further discussion.
-#
-# From Paul Eggert (1999-06-10):
-# Kasperski also writes that the government futzed with the rules in 1997
-# or 1998 but he doesn't remember the details. Assume they switched to
-# EU rules in 1999.
+ 1:00 Poland CE%sT 1977
+ 1:00 W-Eur CE%sT 1988
1:00 EU CE%sT
# Portugal
#
-# From Rui Pedro Salgueiro <rps@inescca.inescc.pt> (1992-11-12):
+# From Rui Pedro Salgueiro (1992-11-12):
# Portugal has recently (September, 27) changed timezone
# (from WET to MET or CET) to harmonize with EEC.
#
-# Martin Bruckmann <martin@ua.pt> (1996-02-29) reports via Peter Ilieve
+# Martin Bruckmann (1996-02-29) reports via Peter Ilieve
# that Portugal is reverting to 0:00 by not moving its clocks this spring.
# The new Prime Minister was fed up with getting up in the dark in the winter.
#
@@ -1824,25 +1877,25 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct
# Russia
-# From Paul Eggert <eggert@twinsun.com> (1999-11-12):
+# From Paul Eggert (1999-11-12):
# Except for Moscow after 1919-07-01, I invented the time zone abbreviations.
# Moscow time zone abbreviations after 1919-07-01, and Moscow rules after 1991,
# are from Andrey A. Chernov. The rest is from Shanks, except we follow
# Chernov's report that 1992 DST transitions were Sat 23:00, not Sun 02:00s.
#
-# From Stanislaw A. Kuzikowski <S.A.Kuz@iae.nsk.su> (1994-06-29):
+# From Stanislaw A. Kuzikowski (1994-06-29):
# But now it is some months since Novosibirsk is 3 hours ahead of Moscow!
# I do not know why they have decided to make this change;
# as far as I remember it was done exactly during winter->summer switching
# so we (Novosibirsk) simply did not switch.
#
-# From Andrey A. Chernov <ache@nagual.ru> (1996-10-04):
+# From Andrey A. Chernov (1996-10-04):
# `MSK' and `MSD' were born and used initially on Moscow computers with
# UNIX-like OSes by several developer groups (e.g. Demos group, Kiae group)....
# The next step was the UUCP network, the Relcom predecessor
# (used mainly for mail), and MSK/MSD was actively used there.
#
-# From Chris Carrier <72157.3334@CompuServe.COM> (1996-10-30):
+# From Chris Carrier (1996-10-30):
# According to a friend of mine who rode the Trans-Siberian Railroad from
# Moscow to Irkutsk in 1995, public air and rail transport in Russia ...
# still follows Moscow time, no matter where in Russia it is located.
@@ -2030,7 +2083,7 @@ Zone Europe/Belgrade 1:22:00 - LMT 1884
1:00 - CET 1941 Apr 18 23:00
1:00 C-Eur CE%sT 1945 May 8 2:00s
1:00 1:00 CEST 1945 Sep 16 2:00s
-# Metod Kozelj <metod.kozelj@rzs-hm.si> reports that the legal date of
+# Metod Kozelj reports that the legal date of
# transition to EU rules was 1982-11-27, for all of Yugoslavia at the time.
# Shanks doesn't give as much detail, so go with Kozelj.
1:00 - CET 1982 Nov 27
@@ -2304,7 +2357,7 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880
3:00 Russia MSK/MSD 1990
3:00 - MSK 1990 Jul 1 2:00
2:00 - EET 1992
-# From Paul Eggert <eggert@twinsun.com> (1999-11-12):
+# From Paul Eggert (1999-11-12):
# The _Economist_ (1994-05-28, p 45) reports that central Crimea switched
# from Kiev to Moscow time sometime after the January 1994 elections.
# Shanks says ``date of change uncertain'', but implies that it happened
@@ -2334,8 +2387,7 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880
# ...
# Date: Wed, 28 Jan 87 16:56:27 -0100
-# From: seismo!mcvax!cgcha!wtho (Tom Hofmann)
-# Message-Id: <8701281556.AA22174@cgcha.uucp>
+# From: Tom Hofmann
# ...
#
# ...the European time rules are...standardized since 1981, when
@@ -2354,11 +2406,11 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880
#
# Tom Hofmann, Scientific Computer Center, CIBA-GEIGY AG,
# 4002 Basle, Switzerland
-# UUCP: ...!mcvax!cernvax!cgcha!wtho
+# ...
# ...
# Date: Wed, 4 Feb 87 22:35:22 +0100
-# From: seismo!mcvax!cwi.nl!dik (Dik T. Winter)
+# From: Dik T. Winter
# ...
#
# The information from Tom Hofmann is (as far as I know) not entirely correct.
@@ -2384,8 +2436,7 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880
#
# ...
# dik t. winter, cwi, amsterdam, nederland
-# INTERNET : dik@cwi.nl
-# BITNET/EARN: dik@mcvax
+# ...
# From Bob Devine (1988-01-28):
# ...
diff --git a/timezone/factory b/timezone/factory
index ba27c63..946063c 100644
--- a/timezone/factory
+++ b/timezone/factory
@@ -1,4 +1,4 @@
-# @(#)factory 7.3
+# @(#)factory 8.1
# For companies who don't want to put time zone specification in
# their installation procedures. When users run date, they'll get the message.
diff --git a/timezone/iso3166.tab b/timezone/iso3166.tab
index b17843a..1cfaf26 100644
--- a/timezone/iso3166.tab
+++ b/timezone/iso3166.tab
@@ -1,8 +1,8 @@
# ISO 3166 alpha-2 country codes
#
-# @(#)iso3166.tab 1.15
+# @(#)iso3166.tab 8.1
#
-# From Paul Eggert <eggert@twinsun.com> (2004-06-14):
+# From Paul Eggert (2004-06-14):
#
# This file contains a table with the following columns:
# 1. ISO 3166-1 alpha-2 country code, current as of
@@ -255,7 +255,7 @@ VI Virgin Islands (US)
VN Vietnam
VU Vanuatu
WF Wallis & Futuna
-WS Samoa (Western)
+WS Samoa (western)
YE Yemen
YT Mayotte
ZA South Africa
diff --git a/timezone/leapseconds b/timezone/leapseconds
index 7add330..d2b506b 100644
--- a/timezone/leapseconds
+++ b/timezone/leapseconds
@@ -1,4 +1,4 @@
-# @(#)leapseconds 7.17
+# @(#)leapseconds 8.1
# Allowance for leapseconds added to each timezone file.
@@ -43,39 +43,50 @@ Leap 1994 Jun 30 23:59:60 + S
Leap 1995 Dec 31 23:59:60 + S
Leap 1997 Jun 30 23:59:60 + S
Leap 1998 Dec 31 23:59:60 + S
+Leap 2005 Dec 31 23:59:60 + S
-# INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
-#
+# INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS)
+#
# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE
-#
+#
# SERVICE DE LA ROTATION TERRESTRE
# OBSERVATOIRE DE PARIS
# 61, Av. de l'Observatoire 75014 PARIS (France)
# Tel. : 33 (0) 1 40 51 22 26
# FAX : 33 (0) 1 40 51 22 91
-# Internet : services.iers@obspm.fr
-#
-# Paris, 15 January 2004
-#
-# Bulletin C 27
-#
-# To authorities responsible
-# for the measurement and
-# distribution of time
-#
-# INFORMATION ON UTC - TAI
-#
-# NO positive leap second will be introduced at the end of June 2004.
+# ...
+# http://hpiers.obspm.fr/eop-pc
+#
+# Paris, 4 July 2005
+#
+# Bulletin C 30
+#
+# To authorities responsible
+# for the measurement and
+# distribution of time
+#
+#
+# UTC TIME STEP
+# on the 1st of January 2006
+#
+# A positive leap second will be introduced at the end of December 2005.
+# The sequence of dates of the UTC second markers will be:
+#
+# 2005 December 31, 23h 59m 59s
+# 2005 December 31, 23h 59m 60s
+# 2006 January 1, 0h 0m 0s
+#
# The difference between UTC and the International Atomic Time TAI is:
-#
-# from 1999 January 1, 0h UTC, until further notice : UTC-TAI = -32 s
-#
-# Leap seconds can be introduced in UTC at the end of the months of December
+#
+# from 1999 January 1, 0h UTC, to 2006 January 1 0h UTC : UTC-TAI = - 32s
+# from 2006 January 1, 0h UTC, until further notice : UTC-TAI = - 33s
+#
+# Leap seconds can be introduced in UtC at the end of the months of December
# or June, depending on the evolution of UT1-TAI. Bulletin C is mailed every
-# six months, either to announce a time step in UTC, or to confirm that there
+# six months, either to announce a time step in UTC or to confirm that there
# will be no time step at the next possible date.
-#
-# Daniel GAMBIS
-# Director
-# Earth Orientation Center of IERS
-# Observatoire de Paris, France
+#
+# Daniel GAMBIS
+# Head
+# Earth Orientation Center of IERS
+# Observatoire de Paris, France
diff --git a/timezone/northamerica b/timezone/northamerica
index 6e755b0..73e2470 100644
--- a/timezone/northamerica
+++ b/timezone/northamerica
@@ -1,11 +1,13 @@
-# @(#)northamerica 7.69
+# @(#)northamerica 8.1
+# <pre>
+
# also includes Central America and the Caribbean
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
# tz@elsie.nci.nih.gov for general use in the future).
-# From Paul Eggert <eggert@twinsun.com> (1999-03-22):
+# From Paul Eggert (1999-03-22):
# A reliable and entertaining source about time zones is
# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997).
@@ -24,12 +26,16 @@
# His proposal was adopted by the railroads on 1883-11-18 at 12:00,
# and the most of the country soon followed suit.
-# From Paul Eggert <eggert@twinsun.com> (1995-12-19):
+# From Paul Eggert (2005-04-16):
+# That 1883 transition occurred at 12:00 new time, not at 12:00 old time.
+# See p 46 of David Prerau, Seize the daylight, Thunder's Mouth Press (2005).
+
+# From Paul Eggert (1995-12-19):
# A good source for time zone historical data in the US is
# Thomas G. Shanks, The American Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1991).
# Make sure you have the errata sheet; the book is somewhat useless without it.
-# It is the source for the US and Puerto Rico entries below.
+# It is the source for most of the pre-1991 US and Puerto Rico entries below.
# From Paul Eggert (2001-03-06):
# Daylight Saving Time was first suggested as a joke by Benjamin Franklin
@@ -48,7 +54,8 @@
# to push people into bed earlier, and get them up earlier, to make
# them healthy, wealthy and wise in spite of themselves.
#
-# -- Robertson Davies, The Diary of Samuel Marchbanks (1947), XIX, Sunday
+# -- Robertson Davies, The diary of Samuel Marchbanks,
+# Clarke, Irwin (1947), XIX, Sunday
#
# For more about the first ten years of DST in the United States, see
# Robert Garland's <a href="http://www.clpgh.org/exhibit/dst.html">
@@ -78,7 +85,7 @@
# Time' instead of the old familiar 'Eastern War Time.' Peace is wonderful."
# </a> (August 1945) by way of confirmation.
-# From Joseph Gallant <notquite@hotmail.com>, citing
+# From Joseph Gallant citing
# George H. Douglas, _The Early Days of Radio Broadcasting_ (1987):
# At 7 P.M. (Eastern War Time) [on 1945-08-14], the networks were set
# to switch to London for Attlee's address, but the American people
@@ -105,21 +112,46 @@
#
# He had scored a 20-second scoop on other broadcasters.
+# From Arthur David Olson (2005-08-22):
+# Paul has been careful to use the "US" rules only in those locations
+# that are part of the United States; this reflects the real scope of
+# U.S. government action. So even though the "US" rules have changed
+# in the latest release, other countries won't be affected.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule US 1918 1919 - Mar lastSun 2:00 1:00 D
Rule US 1918 1919 - Oct lastSun 2:00 0 S
Rule US 1942 only - Feb 9 2:00 1:00 W # War
Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace
Rule US 1945 only - Sep 30 2:00 0 S
-Rule US 1967 max - Oct lastSun 2:00 0 S
+Rule US 1967 2006 - Oct lastSun 2:00 0 S
Rule US 1967 1973 - Apr lastSun 2:00 1:00 D
Rule US 1974 only - Jan 6 2:00 1:00 D
Rule US 1975 only - Feb 23 2:00 1:00 D
Rule US 1976 1986 - Apr lastSun 2:00 1:00 D
-Rule US 1987 max - Apr Sun>=1 2:00 1:00 D
-# <a href="http://thomas.loc.gov/cgi-bin/bdquery/z?d106:h.r.00177:">
-# H.R.177
-# </a> (introduced 1999-01-06) would change April to March in the above rule.
+Rule US 1987 2006 - Apr Sun>=1 2:00 1:00 D
+Rule US 2007 max - Mar Sun>=8 2:00 1:00 D
+Rule US 2007 max - Nov Sun>=1 2:00 0 S
+
+# From Arthur David Olson, 2005-12-19
+# We generate the files specified below to guard against old files with
+# obsolete information being left in the time zone binary directory.
+# We limit the list to names that have appeared in previous versions of
+# this time zone package.
+# We do these as separate Zones rather than as Links to avoid problems if
+# a particular place changes whether it observes DST.
+# We put these specifications here in the northamerica file both to
+# increase the chances that they'll actually get compiled and to
+# avoid the need to duplicate the US rules in another file.
+
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone EST -5:00 - EST
+Zone MST -7:00 - MST
+Zone HST -10:00 - HST
+Zone EST5EDT -5:00 US E%sT
+Zone CST6CDT -6:00 US C%sT
+Zone MST7MDT -7:00 US M%sT
+Zone PST8PDT -8:00 US P%sT
# From Bob Devine (1988-01-28):
# ...Alaska (and Hawaii) had the timezone names changed in 1967.
@@ -197,17 +229,53 @@ Rule US 1987 max - Apr Sun>=1 2:00 1:00 D
# Public law 106-564 (2000-12-23) introduced the abbreviation
# "Chamorro Standard Time" for time in Guam and the Northern Marianas.
# See the file "australasia".
-
+
+# From Arthur David Olson, 2005-08-09
+# The following was signed into law on 2005-08-08.
+#
+# H.R. 6, Energy Policy Act of 2005, SEC. 110. DAYLIGHT SAVINGS.
+# (a) Amendment- Section 3(a) of the Uniform Time Act of 1966 (15
+# U.S.C. 260a(a)) is amended--
+# (1) by striking `first Sunday of April' and inserting `second
+# Sunday of March'; and
+# (2) by striking `last Sunday of October' and inserting `first
+# Sunday of November'.
+# (b) Effective Date- Subsection (a) shall take effect 1 year after the
+# date of enactment of this Act or March 1, 2007, whichever is later.
+# (c) Report to Congress- Not later than 9 months after the effective
+# date stated in subsection (b), the Secretary shall report to Congress
+# on the impact of this section on energy consumption in the United
+# States.
+# (d) Right to Revert- Congress retains the right to revert the
+# Daylight Saving Time back to the 2005 time schedules once the
+# Department study is complete.
# US eastern time, represented by New York
# Connecticut, Delaware, District of Columbia, most of Florida,
-# Georgia, southeast Indiana (Clark, Dearborn, Floyd, Harrison, and
-# Ohio counties), eastern Kentucky, Maine, Maryland, Massachusetts,
+# Georgia, southeast Indiana (Dearborn and Ohio counties), eastern Kentucky
+# (except America/Kentucky/Louisville below), Maine, Maryland, Massachusetts,
# New Hampshire, New Jersey, New York, North Carolina, Ohio,
# Pennsylvania, Rhode Island, South Carolina, eastern Tennessee,
# Vermont, Virginia, West Virginia
+# From Dave Cantor (2004-11-02):
+# Early this summer I had the occasion to visit the Mount Washington
+# Observatory weather station atop (of course!) Mount Washington [, NH]....
+# One of the staff members said that the station was on Eastern Standard Time
+# and didn't change their clocks for Daylight Saving ... so that their
+# reports will always have times which are 5 hours behind UTC.
+
+# From Paul Eggert (2005-08-26):
+# According to today's Huntsville Times
+# <http://www.al.com/news/huntsvilletimes/index.ssf?/base/news/1125047783228320.xml&coll=1>
+# a few towns on Alabama's "eastern border with Georgia, such as Phenix City
+# in Russell County, Lanett in Chambers County and some towns in Lee County,
+# set their watches and clocks on Eastern time." It quotes H.H. "Bubba"
+# Roberts, city administrator in Phenix City. as saying "We are in the Central
+# time zone, but we do go by the Eastern time zone because so many people work
+# in Columbus."
+
# 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
@@ -215,7 +283,7 @@ Rule NYC 1921 1966 - Apr lastSun 2:00 1:00 D
Rule NYC 1921 1954 - Sep lastSun 2:00 0 S
Rule NYC 1955 1966 - Oct lastSun 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:00
+Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58
-5:00 US E%sT 1920
-5:00 NYC E%sT 1942
-5:00 US E%sT 1946
@@ -241,7 +309,7 @@ Rule Chicago 1922 1966 - Apr lastSun 2:00 1:00 D
Rule Chicago 1922 1954 - Sep lastSun 2:00 0 S
Rule Chicago 1955 1966 - Oct lastSun 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 12:00
+Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 12:09:24
-6:00 US C%sT 1920
-6:00 Chicago C%sT 1936 Mar 1 2:00
-5:00 - EST 1936 Nov 15 2:00
@@ -250,9 +318,17 @@ Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 12:00
-6:00 Chicago C%sT 1967
-6:00 US C%sT
# Oliver County, ND switched from mountain to central time on 1992-10-25.
-Zone America/North_Dakota/Center -6:45:12 - LMT 1883 Nov 18 12:00
+Zone America/North_Dakota/Center -6:45:12 - LMT 1883 Nov 18 12:14:48
-7:00 US M%sT 1992 Oct 25 02:00
-6:00 US C%sT
+# From Paul Eggert (2006-01-20):
+# The following is not implemented yet.
+# What is the most populous city in that area?
+# From http://www.statoids.com/tus.html (2006-01-20):
+# 2003-10-26 02:00: All of Morton County, ND, and the part of Sioux
+# County, ND east of ND route 31 moved from MT to CT. (The area
+# around Fort Yates in Sioux County and the area around Mandan in
+# Morton County were already in CT.)
# US mountain time, represented by Denver
#
@@ -269,7 +345,7 @@ Rule Denver 1921 only - May 22 2:00 0 S
Rule Denver 1965 1966 - Apr lastSun 2:00 1:00 D
Rule Denver 1965 1966 - Oct lastSun 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/Denver -6:59:56 - LMT 1883 Nov 18 12:00
+Zone America/Denver -6:59:56 - LMT 1883 Nov 18 12:00:04
-7:00 US M%sT 1920
-7:00 Denver M%sT 1942
-7:00 US M%sT 1946
@@ -289,7 +365,7 @@ Rule CA 1950 1966 - Apr lastSun 2:00 1:00 D
Rule CA 1950 1961 - Sep lastSun 2:00 0 S
Rule CA 1962 1966 - Oct lastSun 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12:00
+Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12:07:02
-8:00 US P%sT 1946
-8:00 CA P%sT 1967
-8:00 US P%sT
@@ -355,10 +431,26 @@ Zone America/Adak 12:13:21 - LMT 1867 Oct 18
-11:00 US B%sT 1983 Oct 30 2:00
-10:00 US AH%sT 1983 Nov 30
-10:00 US HA%sT
+# The following switches don't quite make our 1970 cutoff.
+#
# Shanks writes that part of southwest Alaska (e.g. Aniak)
# switched from -11:00 to -10:00 on 1968-09-22 at 02:00,
# and another part (e.g. Akiak) made the same switch five weeks later.
-# These switches don't quite make our 1970 cutoff.
+#
+# From David Flater (2004-11-09):
+# In e-mail, 2004-11-02, Ray Hudson, historian/liaison to the Unalaska
+# Historic Preservation Commission, provided this information, which
+# suggests that Unalaska deviated from statutory time from early 1967
+# possibly until 1983:
+#
+# Minutes of the Unalaska City Council Meeting, January 10, 1967:
+# "Except for St. Paul and Akutan, Unalaska is the only important
+# location not on Alaska Standard Time. The following resolution was
+# made by William Robinson and seconded by Henry Swanson: Be it
+# resolved that the City of Unalaska hereby goes to Alaska Standard
+# Time as of midnight Friday, January 13, 1967 (1 A.M. Saturday,
+# January 14, Alaska Standard Time.) This resolution was passed with
+# three votes for and one against."
# Hawaii
#
@@ -400,7 +492,7 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1900 Jan 1 12:00
# Shanks says the 1944 experiment came to an end on 1944-03-17.
# Go with the Arizona State Library instead.
-Zone America/Phoenix -7:28:18 - LMT 1883 Nov 18 12:00
+Zone America/Phoenix -7:28:18 - LMT 1883 Nov 18 11:31:42
-7:00 US M%sT 1944 Jan 1 00:01
-7:00 - MST 1944 Apr 1 00:01
-7:00 US M%sT 1944 Oct 1 00:01
@@ -422,9 +514,9 @@ Link America/Denver America/Shiprock
# Lemhi, Lincoln, Madison, Minidoka, Oneida, Owyhee, Payette, Power,
# Teton, Twin Falls, Valley, Washington counties) and eastern Oregon
# switched four weeks late in 1974.
-#
+#
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/Boise -7:44:49 - LMT 1883 Nov 18 12:00
+Zone America/Boise -7:44:49 - LMT 1883 Nov 18 12:15:11
-8:00 US P%sT 1923 May 13 2:00
-7:00 US M%sT 1974
-7:00 - MST 1974 Feb 3 2:00
@@ -435,40 +527,55 @@ Zone America/Boise -7:44:49 - LMT 1883 Nov 18 12:00
# For a map of Indiana's time zone regions, see:
# <a href="http://www.mccsc.edu/time.html">
# What time is it in Indiana?
-# </a> (1999-04-06)
+# </a> (2005-10-30)
#
-# From Paul Eggert (1995-12-19):
-# Indiana generally observes either EST all year, or CST/CDT,
-# but areas near Cincinnati and Louisville use those cities' timekeeping
-# and in 1969 and 1970 the whole state observed daylight time;
-# and there are other exceptions as noted below.
-# Shanks partitions Indiana into 345 regions, each with its own time history,
-# and writes ``Even newspaper reports present contradictory information.''
-# Fortunately, most of the complexity occurred before our cutoff date of 1970.
+# From Paul Eggert (2006-01-20):
+# Since 1970, most of Indiana has been like America/Indiana/Indianapolis,
+# with the following exceptions:
+#
+# - Gibson, Jasper, Lake, LaPorte, Newton, Porter, Posey, Spencer,
+# Vandenburgh, and Warrick counties have been like America/Chicago.
#
-# Since 1970, EST-only Indiana has been like America/Indianapolis,
-# with exceptions noted below for Crawford, Starke, and Switzerland counties.
-# The parts of Indiana not listed below have been like America/Chicago,
-# America/Louisville, or America/New_York.
+# - Dearborn and Ohio counties have been like America/New_York.
+#
+# - Clark, Floyd, and Harrison counties have been like
+# America/Kentucky/Louisville.
+#
+# - Daviess, Dubois, Knox, Martin, Perry, and Pulaski counties
+# have been like America/Indiana/Vincennes.
+#
+# - Crawford, Pike, Starke, and Switzerland counties have their own time zone
+# histories as noted below.
+#
+# Shanks partitioned Indiana into 345 regions, each with its own time history,
+# and wrote ``Even newspaper reports present contradictory information.''
+# Fortunately, most of the complexity occurred before our cutoff date of 1970.
#
# Other than Indianapolis, the Indiana place names are so nondescript
# that they would be ambiguous if we left them at the `America' level.
# So we reluctantly put them all in a subdirectory `America/Indiana'.
-#
-# Most of EST-only Indiana last observed DST in 1970.
-# From Paul Eggert (2001-03-06), following a tip by Markus Kuhn:
-# Pam Belluck reported in the New York Times (2001-01-31) that the
-# Indiana Legislature is considering a bill to adopt DST statewide.
-# Her article mentioned Vevay, whose post office observes a different
-# time zone from Danner's Hardware across the street.
+# From Paul Eggert (2005-08-16):
+# http://www.mccsc.edu/time.html says that Indiana will use DST starting 2006.
+
+# From Deborah Goldsmith (2006-01-18):
+# http://dmses.dot.gov/docimages/pdf95/382329_web.pdf
+# From Paul Eggert (2006-01-20):
+# It says "DOT is relocating the time zone boundary in Indiana to move Starke,
+# Pulaski, Knox, Daviess, Martin, Pike, Dubois, and Perry Counties from the
+# Eastern Time Zone to the Central Time Zone.... The effective date of
+# this rule is 2:OO a.m. EST Sunday, April 2, 2006, which is the
+# changeover date from standard time to Daylight Saving Time."
+# Strictly speaking, this means the affected counties will change their
+# clocks twice that night, but this obviously is in error. The intent
+# is that 01:59:59 EST be followed by 02:00:00 CDT.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule Indianapolis 1941 only - Jun 22 2:00 1:00 D
Rule Indianapolis 1941 1954 - Sep lastSun 2:00 0 S
Rule Indianapolis 1946 1954 - Apr lastSun 2:00 1:00 D
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/Indianapolis -5:44:38 - LMT 1883 Nov 18 12:00
+Zone America/Indiana/Indianapolis -5:44:38 - LMT 1883 Nov 18 12:15:22
-6:00 US C%sT 1920
-6:00 Indianapolis C%sT 1942
-6:00 US C%sT 1946
@@ -477,27 +584,66 @@ Zone America/Indianapolis -5:44:38 - LMT 1883 Nov 18 12:00
-6:00 - CST 1958 Apr 27 2:00
-5:00 - EST 1969
-5:00 US E%sT 1971
- -5:00 - EST
-Link America/Indianapolis America/Indiana/Indianapolis
+ -5:00 - EST 2006
+ -5:00 US E%sT
#
-# Part of Crawford County, Indiana, last observed DST in 1975,
-# and left its clocks alone in 1974.
+# Eastern Crawford County, Indiana, left its clocks alone in 1974,
+# as well as from 1976 through 2005.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule Marengo 1951 only - Apr lastSun 2:00 1:00 D
Rule Marengo 1951 only - Sep lastSun 2:00 0 S
Rule Marengo 1954 1960 - Apr lastSun 2:00 1:00 D
Rule Marengo 1954 1960 - Sep lastSun 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/Indiana/Marengo -5:45:23 - LMT 1883 Nov 18 12:00
+Zone America/Indiana/Marengo -5:45:23 - LMT 1883 Nov 18 12:14:37
-6:00 US C%sT 1951
-6:00 Marengo C%sT 1961 Apr 30 2:00
-5:00 - EST 1969
-5:00 US E%sT 1974 Jan 6 2:00
-6:00 1:00 CDT 1974 Oct 27 2:00
-5:00 US E%sT 1976
- -5:00 - EST
+ -5:00 - EST 2006
+ -5:00 US E%sT
+#
+# Daviess, Dubois, Knox, Martin, Perry, and Pulaski Counties, Indiana,
+# switched from eastern to central time in April 2006.
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
+Rule Vincennes 1946 only - Apr lastSun 2:00 1:00 D
+Rule Vincennes 1946 only - Sep lastSun 2:00 0 S
+Rule Vincennes 1953 1954 - Apr lastSun 2:00 1:00 D
+Rule Vincennes 1953 1959 - Sep lastSun 2:00 0 S
+Rule Vincennes 1955 only - May 1 0:00 1:00 D
+Rule Vincennes 1956 1963 - Apr lastSun 2:00 1:00 D
+Rule Vincennes 1960 only - Oct lastSun 2:00 0 S
+Rule Vincennes 1961 only - Sep lastSun 2:00 0 S
+Rule Vincennes 1962 1963 - Oct lastSun 2:00 0 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Indiana/Vincennes -5:50:07 - LMT 1883 Nov 18 12:09:53
+ -6:00 US C%sT 1946
+ -6:00 Vincennes C%sT 1964 Apr 26 2:00
+ -5:00 - EST 1969
+ -5:00 US E%sT 1971
+ -5:00 - EST 2006 Apr 2 2:00
+ -6:00 US C%sT
+#
+# Pike County, Indiana moved from central to eastern time in 1977,
+# then switched back in 2006.
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
+Rule Pike 1955 only - May 1 0:00 1:00 D
+Rule Pike 1955 1960 - Sep lastSun 2:00 0 S
+Rule Pike 1956 1964 - Apr lastSun 2:00 1:00 D
+Rule Pike 1961 1964 - Oct lastSun 2:00 0 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Indiana/Petersburg -5:49:07 - LMT 1883 Nov 18 12:10:53
+ -6:00 US C%sT 1955
+ -6:00 Pike C%sT 1965 Apr 25 2:00
+ -5:00 - EST 1966 Oct 30 2:00
+ -6:00 US C%sT 1977 Oct 30 2:00
+ -5:00 - EST 2006 Apr 2 2:00
+ -6:00 US C%sT
#
-# Starke County, Indiana
+# Starke County, Indiana moved from central to eastern time in 1991,
+# then switched back in 2006.
# From Arthur David Olson (1991-10-28):
# An article on page A3 of the Sunday, 1991-10-27 Washington Post
# notes that Starke County switched from Central time to Eastern time as of
@@ -509,23 +655,25 @@ Rule Starke 1955 1956 - Oct lastSun 2:00 0 S
Rule Starke 1957 1958 - Sep lastSun 2:00 0 S
Rule Starke 1959 1961 - Oct lastSun 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/Indiana/Knox -5:46:30 - LMT 1883 Nov 18 12:00
+Zone America/Indiana/Knox -5:46:30 - LMT 1883 Nov 18 12:13:30
-6:00 US C%sT 1947
-6:00 Starke C%sT 1962 Apr 29 2:00
-5:00 - EST 1963 Oct 27 2:00
-6:00 US C%sT 1991 Oct 27 2:00
- -5:00 - EST
+ -5:00 - EST 2006 Apr 2 2:00
+ -6:00 US C%sT
#
-# Switzerland County, Indiana, last observed DST in 1972.
+# Switzerland County, Indiana, did not observe DST from 1973 through 2005.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/Indiana/Vevay -5:40:16 - LMT 1883 Nov 18 12:00
+Zone America/Indiana/Vevay -5:40:16 - LMT 1883 Nov 18 12:19:44
-6:00 US C%sT 1954 Apr 25 2:00
-5:00 - EST 1969
-5:00 US E%sT 1973
- -5:00 - EST
+ -5:00 - EST 2006
+ -5:00 US E%sT
# Part of Kentucky left its clocks alone in 1974.
-# This also includes a part of Indiana immediately adjacent to Louisville.
+# This also includes Clark, Floyd, and Harrison counties in Indiana.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule Louisville 1921 only - May 1 2:00 1:00 D
Rule Louisville 1921 only - Sep 1 2:00 0 S
@@ -535,7 +683,7 @@ Rule Louisville 1946 only - Jun 2 2:00 0 S
Rule Louisville 1950 1955 - Sep lastSun 2:00 0 S
Rule Louisville 1956 1960 - Oct lastSun 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
-Zone America/Louisville -5:43:02 - LMT 1883 Nov 18 12:00
+Zone America/Kentucky/Louisville -5:43:02 - LMT 1883 Nov 18 12:16:58
-6:00 US C%sT 1921
-6:00 Louisville C%sT 1942
-6:00 US C%sT 1946
@@ -544,9 +692,8 @@ Zone America/Louisville -5:43:02 - LMT 1883 Nov 18 12:00
-5:00 US E%sT 1974 Jan 6 2:00
-6:00 1:00 CDT 1974 Oct 27 2:00
-5:00 US E%sT
-Link America/Louisville America/Kentucky/Louisville
#
-# Wayne, Clinton, and Russell Counties, Kentucky
+# Wayne County, Kentucky
#
# From
# <a href="http://www.lake-cumberland.com/life/archive/news990129time.shtml">
@@ -572,7 +719,7 @@ Link America/Louisville America/Kentucky/Louisville
# Federal Register 65, 160 (2000-08-17), page 50154-50158.
# </a>
#
-Zone America/Kentucky/Monticello -5:39:24 - LMT 1883 Nov 18 12:00
+Zone America/Kentucky/Monticello -5:39:24 - LMT 1883 Nov 18 12:20:36
-6:00 US C%sT 1946
-6:00 - CST 1968
-6:00 US C%sT 2000 Oct 29 2:00
@@ -643,7 +790,8 @@ Zone America/Detroit -5:32:11 - LMT 1905
-5:00 - EST 1975 Apr 27 2:00
-5:00 US E%sT
#
-# The Michigan border with Wisconsin switched from EST to CST/CDT in 1973.
+# Dickinson, Gogebic, Iron, and Menominee Counties, Michigan,
+# switched from EST to CST/CDT in 1973.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
Rule Menominee 1946 only - Apr lastSun 2:00 1:00 D
Rule Menominee 1946 only - Sep lastSun 2:00 0 S
@@ -667,21 +815,10 @@ Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
# _Los Angeles Times_ (1998-11-10), A1, A10; it cites
# Jimmy Skaggs, _The Great Guano Rush_ (1994).
-# Old names, for S5 users
-
-# Link LINK-FROM LINK-TO
-Link America/New_York EST5EDT
-Link America/Chicago CST6CDT
-Link America/Denver MST7MDT
-Link America/Los_Angeles PST8PDT
-Link America/Indianapolis EST
-Link America/Phoenix MST
-Link Pacific/Honolulu HST
-
################################################################################
-# From Paul Eggert <eggert@twinsun.com> (1999-10-29):
+# From Paul Eggert (1999-10-29):
# A good source for time zone historical data outside the US is
# Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999).
@@ -709,7 +846,7 @@ Link Pacific/Honolulu HST
# Canada
-# From Alain LaBont<e'> <ALB@immedia.ca> (1994-11-14):
+# From Alain LaBont<e'> (1994-11-14):
# I post here the time zone abbreviations standardized in Canada
# for both English and French in the CAN/CSA-Z234.4-89 standard....
#
@@ -738,23 +875,42 @@ Link Pacific/Honolulu HST
# T: de Terre-Neuve
# Y: du Yukon Yukon
#
-# From Paul Eggert <eggert@twinsun.com> (1994-11-22):
+# From Paul Eggert (1994-11-22):
# Alas, this sort of thing must be handled by localization software.
# Unless otherwise specified, the data for Canada are all from Shanks.
-# From Paul Eggert (2000-10-02):
+# From Paul Eggert (2005-12-21):
# H. David Matthews and Mary Vincent's map
-# <a href="http://www.canadiangeographic.ca/SO98/geomap.htm">
+# <a href="http://www.canadiangeographic.ca/Magazine/SO98/geomap.asp">
# "It's about TIME", _Canadian Geographic_ (September-October 1998)
# </a> 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
-# <a href="http://www.nrc.ca/inms/time/tze.html">
+# INMS, the Institute for National Measurement Standards in Ottawa, has <a
+# href="http://inms-ienm.nrc-cnrc.gc.ca/en/time_services/daylight_saving_e.php">
# information about standard and daylight saving time zones in Canada.
# </a> (updated periodically).
# Its unofficial information is often taken from Matthews and Vincent.
+#
+# CBC News reported that Ontario and Manitoba have announced plans to
+# follow the US change, and that Nova Scotia is considering it; see
+# <http://www.cbc.ca/news/background/daylightsavingtime/> (2005-10-21).
+# CBC news also reported that Prince Edward Island is the first
+# province in Atlantic Canada to follow the US change, and that Quebec
+# had agreed; see <http://www.cbc.ca/pei/story/pe_daylight_20051207.html>
+# (2005-12-07).
+#
+# To reflect all this, the Canada and Winn rules have been adjusted to
+# agree with the 2007 US change. This means we assume most of Canada
+# will fall into line. However, Alberta, British Columbia,
+# Newfoundland, Northwest Territories, and Yukon already have separate
+# rules in our database, so for now we'll leave them alone, which
+# means that we currently assume these regions will not change their
+# rules and will disagree with the US starting in 2007. This
+# assumption is probably incorrect, with the possible exception of
+# Newfoundland. We plan to adjust the Edm, Vanc, StJohns, and NT_YK
+# rules as the corresponding provinces make their announcements.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Canada 1918 only - Apr 14 2:00 1:00 D
@@ -763,8 +919,10 @@ Rule Canada 1942 only - Feb 9 2:00 1:00 W # War
Rule Canada 1945 only - Aug 14 23:00u 1:00 P # Peace
Rule Canada 1945 only - Sep 30 2:00 0 S
Rule Canada 1974 1986 - Apr lastSun 2:00 1:00 D
-Rule Canada 1974 max - Oct lastSun 2:00 0 S
-Rule Canada 1987 max - Apr Sun>=1 2:00 1:00 D
+Rule Canada 1974 2006 - Oct lastSun 2:00 0 S
+Rule Canada 1987 2006 - Apr Sun>=1 2:00 1:00 D
+Rule Canada 2007 max - Mar Sun>=8 2:00 1:00 D
+Rule Canada 2007 max - Nov Sun>=1 2:00 0 S
# Newfoundland (and far southeast Labrador)
@@ -829,7 +987,7 @@ Zone America/Goose_Bay -4:01:40 - LMT 1884 # Happy Valley-Goose Bay
-4:00 StJohns A%sT
-# west Labrador, New Brunswick, Nova Scotia, Prince Edward I
+# west Labrador, Nova Scotia, Prince Edward I
# From Paul Eggert (1996-06-12):
# Shanks writes that since 1970 most of this region has been like Halifax.
@@ -838,53 +996,48 @@ Zone America/Goose_Bay -4:01:40 - LMT 1884 # Happy Valley-Goose Bay
# Shanks also writes that Liverpool, NS was the only town in Canada to observe
# DST in 1971 but not 1970; for now we'll assume this is a typo.
-# From Paul Eggert (2000-10-02):
-# INMS (2000-09-12) says that, since 1988 at least, New Brunswick switches
-# at 00:01 local time. FIXME: verify and create a new Zone for this.
-
-
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-Rule Halifax 1916 only - Apr 1 0:00 1:00 D
-Rule Halifax 1916 only - Oct 1 0:00 0 S
-Rule Halifax 1920 only - May 9 0:00 1:00 D
-Rule Halifax 1920 only - Aug 29 0:00 0 S
-Rule Halifax 1921 only - May 6 0:00 1:00 D
-Rule Halifax 1921 1922 - Sep 5 0:00 0 S
-Rule Halifax 1922 only - Apr 30 0:00 1:00 D
-Rule Halifax 1923 1925 - May Sun>=1 0:00 1:00 D
-Rule Halifax 1923 only - Sep 4 0:00 0 S
-Rule Halifax 1924 only - Sep 15 0:00 0 S
-Rule Halifax 1925 only - Sep 28 0:00 0 S
-Rule Halifax 1926 only - May 16 0:00 1:00 D
-Rule Halifax 1926 only - Sep 13 0:00 0 S
-Rule Halifax 1927 only - May 1 0:00 1:00 D
-Rule Halifax 1927 only - Sep 26 0:00 0 S
-Rule Halifax 1928 1931 - May Sun>=8 0:00 1:00 D
-Rule Halifax 1928 only - Sep 9 0:00 0 S
-Rule Halifax 1929 only - Sep 3 0:00 0 S
-Rule Halifax 1930 only - Sep 15 0:00 0 S
-Rule Halifax 1931 1932 - Sep Mon>=24 0:00 0 S
-Rule Halifax 1932 only - May 1 0:00 1:00 D
-Rule Halifax 1933 only - Apr 30 0:00 1:00 D
-Rule Halifax 1933 only - Oct 2 0:00 0 S
-Rule Halifax 1934 only - May 20 0:00 1:00 D
-Rule Halifax 1934 only - Sep 16 0:00 0 S
-Rule Halifax 1935 only - Jun 2 0:00 1:00 D
-Rule Halifax 1935 only - Sep 30 0:00 0 S
-Rule Halifax 1936 only - Jun 1 0:00 1:00 D
-Rule Halifax 1936 only - Sep 14 0:00 0 S
-Rule Halifax 1937 1938 - May Sun>=1 0:00 1:00 D
-Rule Halifax 1937 1941 - Sep Mon>=24 0:00 0 S
-Rule Halifax 1939 only - May 28 0:00 1:00 D
-Rule Halifax 1940 1941 - May Sun>=1 0:00 1:00 D
-Rule Halifax 1946 1949 - Sep lastSun 2:00 0 S
-Rule Halifax 1946 1949 - Apr lastSun 2:00 1:00 D
-Rule Halifax 1951 1954 - Sep lastSun 2:00 0 S
-Rule Halifax 1951 1954 - Apr lastSun 2:00 1:00 D
-Rule Halifax 1956 1959 - Sep lastSun 2:00 0 S
-Rule Halifax 1956 1959 - Apr lastSun 2:00 1:00 D
-Rule Halifax 1962 1973 - Apr lastSun 2:00 1:00 D
-Rule Halifax 1962 1973 - Oct lastSun 2:00 0 S
+Rule Halifax 1916 only - Apr 1 0:00 1:00 D
+Rule Halifax 1916 only - Oct 1 0:00 0 S
+Rule Halifax 1920 only - May 9 0:00 1:00 D
+Rule Halifax 1920 only - Aug 29 0:00 0 S
+Rule Halifax 1921 only - May 6 0:00 1:00 D
+Rule Halifax 1921 1922 - Sep 5 0:00 0 S
+Rule Halifax 1922 only - Apr 30 0:00 1:00 D
+Rule Halifax 1923 1925 - May Sun>=1 0:00 1:00 D
+Rule Halifax 1923 only - Sep 4 0:00 0 S
+Rule Halifax 1924 only - Sep 15 0:00 0 S
+Rule Halifax 1925 only - Sep 28 0:00 0 S
+Rule Halifax 1926 only - May 16 0:00 1:00 D
+Rule Halifax 1926 only - Sep 13 0:00 0 S
+Rule Halifax 1927 only - May 1 0:00 1:00 D
+Rule Halifax 1927 only - Sep 26 0:00 0 S
+Rule Halifax 1928 1931 - May Sun>=8 0:00 1:00 D
+Rule Halifax 1928 only - Sep 9 0:00 0 S
+Rule Halifax 1929 only - Sep 3 0:00 0 S
+Rule Halifax 1930 only - Sep 15 0:00 0 S
+Rule Halifax 1931 1932 - Sep Mon>=24 0:00 0 S
+Rule Halifax 1932 only - May 1 0:00 1:00 D
+Rule Halifax 1933 only - Apr 30 0:00 1:00 D
+Rule Halifax 1933 only - Oct 2 0:00 0 S
+Rule Halifax 1934 only - May 20 0:00 1:00 D
+Rule Halifax 1934 only - Sep 16 0:00 0 S
+Rule Halifax 1935 only - Jun 2 0:00 1:00 D
+Rule Halifax 1935 only - Sep 30 0:00 0 S
+Rule Halifax 1936 only - Jun 1 0:00 1:00 D
+Rule Halifax 1936 only - Sep 14 0:00 0 S
+Rule Halifax 1937 1938 - May Sun>=1 0:00 1:00 D
+Rule Halifax 1937 1941 - Sep Mon>=24 0:00 0 S
+Rule Halifax 1939 only - May 28 0:00 1:00 D
+Rule Halifax 1940 1941 - May Sun>=1 0:00 1:00 D
+Rule Halifax 1946 1949 - Apr lastSun 2:00 1:00 D
+Rule Halifax 1946 1949 - Sep lastSun 2:00 0 S
+Rule Halifax 1951 1954 - Apr lastSun 2:00 1:00 D
+Rule Halifax 1951 1954 - Sep lastSun 2:00 0 S
+Rule Halifax 1956 1959 - Apr lastSun 2:00 1:00 D
+Rule Halifax 1956 1959 - Sep lastSun 2:00 0 S
+Rule Halifax 1962 1973 - Apr lastSun 2:00 1:00 D
+Rule Halifax 1962 1973 - Oct lastSun 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Halifax -4:14:24 - LMT 1902 Jun 15
-4:00 Halifax A%sT 1918
@@ -900,6 +1053,43 @@ Zone America/Glace_Bay -3:59:48 - LMT 1902 Jun 15
-4:00 Halifax A%sT 1974
-4:00 Canada A%sT
+# New Brunswick
+
+# From Paul Eggert (2006-01-20):
+# New Brunswick's Time Definition Act
+# <http://www.gnb.ca/0062/PDF-acts/t-06.pdf> says they change at 00:01, and
+# <http://www.canlii.org/nb/laws/sta/t-6/20030127/whole.html> makes it
+# clear that this has been the case since at least 1993.
+# For now, assume it started in 1993. The Office of the Premier announced
+# <http://www.gnb.ca/cnb/news/pre/2005e1737pr.htm> (2005-12-23)
+# that they will bring forward proposed amendments to harmonize with the US;
+# for now assume that this will happen, but they'll still switch at 00:01.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Moncton 1933 1935 - Jun Sun>=8 1:00 1:00 D
+Rule Moncton 1933 1935 - Sep Sun>=8 1:00 0 S
+Rule Moncton 1936 1938 - Jun Sun>=1 1:00 1:00 D
+Rule Moncton 1936 1938 - Sep Sun>=1 1:00 0 S
+Rule Moncton 1939 only - May 27 1:00 1:00 D
+Rule Moncton 1939 1941 - Sep Sat>=21 1:00 0 S
+Rule Moncton 1940 only - May 19 1:00 1:00 D
+Rule Moncton 1941 only - May 4 1:00 1:00 D
+Rule Moncton 1946 1972 - Apr lastSun 2:00 1:00 D
+Rule Moncton 1946 1956 - Sep lastSun 2:00 0 S
+Rule Moncton 1956 1972 - Oct lastSun 2:00 0 S
+Rule Moncton 1993 2006 - Apr Sun>=1 0:01 1:00 D
+Rule Moncton 1993 2006 - Oct lastSun 0:01 0 S
+Rule Moncton 2007 max - Mar Sun>=8 0:01 1:00 D
+Rule Moncton 2007 max - Nov Sun>=1 0:01 0 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Moncton -4:19:08 - LMT 1883 Dec 9
+ -5:00 - EST 1902 Jun 15
+ -4:00 Canada A%sT 1933
+ -4:00 Moncton A%sT 1942
+ -4:00 Canada A%sT 1946
+ -4:00 Moncton A%sT 1973
+ -4:00 Canada A%sT 1993
+ -4:00 Moncton A%sT
# Ontario, Quebec
@@ -1090,11 +1280,13 @@ Rule Winn 1963 only - Apr lastSun 2:00 1:00 D
Rule Winn 1963 only - Sep 22 2:00 0 S
Rule Winn 1966 1986 - Apr lastSun 2:00 1:00 D
Rule Winn 1966 1986 - Oct lastSun 2:00 0 S
-Rule Winn 1987 max - Apr Sun>=1 2:00 1:00 D
+Rule Winn 1987 2006 - Apr Sun>=1 2:00s 1:00 D
# From Paul Eggert (2000-10-02):
# INMS (2000-09-12) says that, since 1988 at least, Manitoba switches from
# DST at 03:00 local time. For now, assume it started in 1987.
-Rule Winn 1987 max - Oct lastSun 2:00s 0 S
+Rule Winn 1987 2006 - Oct lastSun 2:00s 0 S
+Rule Winn 2007 max - Mar Sun>=8 2:00s 1:00 D
+Rule Winn 2007 max - Nov Sun>=1 2:00s 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Winnipeg -6:28:36 - LMT 1887 Jul 16
-6:00 Winn C%sT
@@ -1123,7 +1315,7 @@ Zone America/Winnipeg -6:28:36 - LMT 1887 Jul 16
# Matthews and Vincent (1998) write that Denare Beach and Creighton
# are like Winnipeg, in violation of Saskatchewan law.
-# From W. Jones <jones@skdad.usask.ca> (1992-11-06):
+# From W. Jones (1992-11-06):
# The. . .below is based on information I got from our law library, the
# provincial archives, and the provincial Community Services department.
# A precise history would require digging through newspaper archives, and
@@ -1241,7 +1433,7 @@ Zone America/Dawson_Creek -8:00:56 - LMT 1884
# From Paul Eggert (1999-10-29):
# Dawson switched to PST in 1973. Inuvik switched to MST in 1979.
-# Mathew Englander <mathew@io.org> (1996-10-07) gives the following refs:
+# Mathew Englander (1996-10-07) gives the following refs:
# * 1967. Paragraph 28(34)(g) of the Interpretation Act, S.C. 1967-68,
# c. 7 defines Yukon standard time as UTC-9. This is still valid;
# see Interpretation Act, R.S.C. 1985, c. I-21, s. 35(1).
@@ -1266,8 +1458,6 @@ Zone America/Dawson_Creek -8:00:56 - LMT 1884
# </a> (1999) reports that Pangnirtung operates on eastern time,
# and that Coral Harbour does not observe DST. We don't know when
# Pangnirtung switched to eastern time; we'll guess 1995.
-# We'll ignore the claim about Coral Harbour for now,
-# since we have no further info.
# From Rives McDow (1999-11-08):
# On October 31, when the rest of Nunavut went to Central time,
@@ -1342,6 +1532,23 @@ Zone America/Dawson_Creek -8:00:56 - LMT 1884
# more.
# [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
+# 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
+# round. Using Google, it's easy to find other websites that confirm this.
+# I wasn't able to find how far back this time regimen goes, but since it
+# 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):
+# For lack of better information, assume that Southampton Island observed
+# daylight saving only during wartime.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule NT_YK 1918 only - Apr 14 2:00 1:00 D
Rule NT_YK 1918 only - Oct 27 2:00 0 S
@@ -1365,6 +1572,9 @@ Zone America/Iqaluit -4:33:52 - LMT 1884 # Frobisher Bay before 1987
-5:00 NT_YK E%sT 1999 Oct 31 2:00
-6:00 Canada C%sT 2000 Oct 29 2:00
-5:00 Canada E%sT
+Zone America/Coral_Harbour -5:32:40 - LMT 1884
+ -5:00 NT_YK E%sT 1946
+ -5:00 - EST
Zone America/Rankin_Inlet -6:08:40 - LMT 1884
-6:00 NT_YK C%sT 2000 Oct 29 2:00
-5:00 - EST 2001 Apr 1 3:00
@@ -1404,7 +1614,7 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# Shanks reports that Baja was at -8:00 in 1922/1923.
# Shanks says the 1930 transition in Baja was 1930-11-16.
# Shanks reports no DST during summer 1931.
-# Shanks reports a transition at 1032-03-30 23:00, not 1932-04-01.
+# Shanks reports a transition at 1932-03-30 23:00, not 1932-04-01.
# Shanks does not report transitions for Baja in 1945 or 1948.
# Shanks reports southern Mexico transitions on 1981-12-01, not 12-23.
# Shanks says Quintana Roo switched to -6:00 on 1982-12-02, and to -5:00
@@ -1420,7 +1630,7 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# Shanks gives 1942-04-01 instead of 1942-04-24, and omits the 1981
# and 1988 DST experiments. Go with spin.com.mx.
-# From Alan Perry <alan.perry@eng.sun.com> (1996-02-15):
+# From Alan Perry (1996-02-15):
# A guy from our Mexico subsidiary finally found the Presidential Decree
# outlining the timezone changes in Mexico.
#
@@ -1731,6 +1941,20 @@ Zone America/Costa_Rica -5:36:20 - LMT 1890 # San Jose
# to DST--and one more hour on 1999-04-04--when the announcers will have
# returned to Baltimore, which switches on that date.)
+# From Evert van der Veer via Steffen Thorsen (2004-10-28):
+# Cuba is not going back to standard time this year.
+# From Paul Eggert (2004-10-28):
+# http://www.granma.cu/ingles/2004/septiembre/juev30/41medid-i.html
+# says that it's due to a problem at the Antonio Guiteras
+# thermoelectric plant, and says "This October there will be no return
+# to normal hours (after daylight saving time)".
+# For now, let's assume that it's a one-year temporary measure.
+
+# From Carlos A. Carnero Delgado (2005-11-12):
+# This year (just like in 2004-2005) there's no change in time zone
+# adjustment in Cuba. We will stay in daylight saving time:
+# http://www.granma.cu/espanol/2005/noviembre/mier9/horario.html
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Cuba 1928 only - Jun 10 0:00 1:00 D
Rule Cuba 1928 only - Oct 10 0:00 0 S
@@ -1759,8 +1983,9 @@ Rule Cuba 1991 1995 - Oct Sun>=8 0:00s 0 S
Rule Cuba 1996 only - Oct 6 0:00s 0 S
Rule Cuba 1997 only - Oct 12 0:00s 0 S
Rule Cuba 1998 1999 - Mar lastSun 0:00s 1:00 D
-Rule Cuba 1998 max - Oct lastSun 0:00s 0 S
+Rule Cuba 1998 2003 - Oct lastSun 0:00s 0 S
Rule Cuba 2000 max - Apr Sun>=1 0:00s 1:00 D
+Rule Cuba 2006 max - Oct lastSun 0:00s 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Havana -5:29:28 - LMT 1890
@@ -1840,6 +2065,26 @@ Zone America/Guatemala -6:02:04 - LMT 1918 Oct 5
-6:00 Guat C%sT
# Haiti
+# From Gwillim Law (2005-04-15):
+# Risto O. Nykanen wrote me that Haiti is now on DST.
+# I searched for confirmation, and I found a
+# <a href="http://www.haitianconsulate.org/time.doc"> press release
+# on the Web page of the Haitian Consulate in Chicago (2005-03-31),
+# </a>. Translated from French, it says:
+#
+# "The Prime Minister's Communication Office notifies the public in general
+# and the press in particular that, following a decision of the Interior
+# Ministry and the Territorial Collectivities [I suppose that means the
+# provinces], Haiti will move to Eastern Daylight Time in the night from next
+# Saturday the 2nd to Sunday the 3rd.
+#
+# "Consequently, the Prime Minister's Communication Office wishes to inform
+# the population that the country's clocks will be set forward one hour
+# starting at midnight. This provision will hold until the last Saturday in
+# October 2005.
+#
+# "Port-au-Prince, March 31, 2005"
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Haiti 1983 only - May 8 0:00 1:00 D
Rule Haiti 1984 1987 - Apr lastSun 0:00 1:00 D
@@ -1847,6 +2092,8 @@ Rule Haiti 1983 1987 - Oct lastSun 0:00 0 S
# Shanks says AT is 2:00, but IATA SSIM (1991/1997) says 1:00s. Go with IATA.
Rule Haiti 1988 1997 - Apr Sun>=1 1:00s 1:00 D
Rule Haiti 1988 1997 - Oct lastSun 1:00s 0 S
+Rule Haiti 2005 only - Apr Sun>=1 0:00 1:00 D
+Rule Haiti 2005 only - Oct lastSun 0:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Port-au-Prince -4:49:20 - LMT 1890
-4:49 - PPMT 1917 Jan 24 12:00 # P-a-P MT
@@ -1898,11 +2145,44 @@ Zone America/Montserrat -4:08:52 - LMT 1911 Jul 1 0:01 # Olveston
# Nicaragua seems to be back at -6:00 but I have not been able to find when
# they changed from -5:00.
#
+# From Steffen Thorsen (2005-04-12):
+# I've got reports from 8 different people that Nicaragua just started
+# DST on Sunday 2005-04-10, in order to save energy because of
+# expensive petroleum. The exact end date for DST is not yet
+# announced, only "September" but some sites also say "mid-September".
+# Some background information is available on the President's official site:
+# http://www.presidencia.gob.ni/Presidencia/Files_index/Secretaria/Notas%20de%20Prensa/Presidente/2005/ABRIL/Gobierno-de-nicaragua-adelanta-hora-oficial-06abril.htm
+# The Decree, no 23-2005 is available here:
+# http://www.presidencia.gob.ni/buscador_gaceta/BD/DECRETOS/2005/Decreto%2023-2005%20Se%20adelanta%20en%20una%20hora%20en%20todo%20el%20territorio%20nacional%20apartir%20de%20las%2024horas%20del%2009%20de%20Abril.pdf
+#
+# From Paul Eggert (2005-05-01):
+# The decree doesn't say anything about daylight saving, but for now let's
+# assume that it is daylight saving and that they'll switch back on the
+# 3rd Sunday in September.
+#
+# From Gwillim Law (2005-04-21):
+# The Associated Press story on the time change, which can be found at
+# http://www.lapalmainteractivo.com/guias/content/gen/ap/America_Latina/AMC_GEN_NICARAGUA_HORA.html
+# and elsewhere, says (fifth paragraph, translated from Spanish): "The last
+# time that a change of clocks was applied to save energy was in the year 2000
+# during the Arnoldo Aleman administration."...
+# The northamerica file says that Nicaragua has been on UTC-6 continuously
+# since December 1998. I wasn't able to find any details of Nicaraguan time
+# changes in 2000. Perhaps a note could be added to the northamerica file, to
+# the effect that we have indirect evidence that DST was observed in 2000.
+#
+# From Jesper Norgaard Welen (2005-11-02):
+# Nicaragua left DST the 2005-10-02 at 00:00 (local time).
+# http://www.presidencia.gob.ni/presidencia/files_index/secretaria/comunicados/2005/septiembre/26septiembre-cambio-hora.htm
+# (2005-09-26)
+#
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Nic 1979 1980 - Mar Sun>=16 0:00 1:00 D
Rule Nic 1979 1980 - Jun Mon>=23 0:00 0 S
-Rule Nic 1992 only - Jan 1 4:00 1:00 D
+Rule Nic 1992 only - Jan 1 4:00 1:00 D
Rule Nic 1992 only - Sep 24 0:00 0 S
+Rule Nic 2005 only - Apr 10 0:00 1:00 D
+Rule Nic 2005 only - Oct 2 0:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Managua -5:45:08 - LMT 1890
-5:45:12 - MMT 1934 Jun 23 # Managua Mean Time?
@@ -1910,7 +2190,7 @@ Zone America/Managua -5:45:08 - LMT 1890
-5:00 - EST 1975 Feb 16
-6:00 Nic C%sT 1993 Jan 1 4:00
-5:00 - EST 1998 Dec
- -6:00 - CST
+ -6:00 Nic C%sT
# Panama
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
diff --git a/timezone/pacificnew b/timezone/pacificnew
index 86dd688..667940b 100644
--- a/timezone/pacificnew
+++ b/timezone/pacificnew
@@ -1,4 +1,4 @@
-# @(#)pacificnew 7.10
+# @(#)pacificnew 8.1
# From Arthur David Olson (1989-04-05):
# On 1989-04-05, the U. S. House of Representatives passed (238-154) a bill
diff --git a/timezone/private.h b/timezone/private.h
index 5766305..2837b70 100644
--- a/timezone/private.h
+++ b/timezone/private.h
@@ -4,7 +4,7 @@
/*
** This file is in the public domain, so clarified as of
-** 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
+** 1996-06-05 by Arthur David Olson.
*/
/*
@@ -21,10 +21,12 @@
#ifndef lint
#ifndef NOID
-static char privatehid[] = "@(#)private.h 7.54";
+static char privatehid[] = "@(#)private.h 8.2";
#endif /* !defined NOID */
#endif /* !defined lint */
+#define GRANDPARENTED "Local time zone must be set--see zic manual page"
+
/*
** Defaults for preprocessor symbols.
** You can override these in your C compiler options, e.g. `-DHAVE_ADJTIME=0'.
@@ -87,17 +89,17 @@ static char privatehid[] = "@(#)private.h 7.54";
#include "stdio.h"
#include "errno.h"
#include "string.h"
-#include "limits.h" /* for CHAR_BIT */
+#include "limits.h" /* for CHAR_BIT et al. */
#include "time.h"
#include "stdlib.h"
-#if HAVE_GETTEXT - 0
+#if HAVE_GETTEXT
#include "libintl.h"
-#endif /* HAVE_GETTEXT - 0 */
+#endif /* HAVE_GETTEXT */
-#if HAVE_SYS_WAIT_H - 0
+#if HAVE_SYS_WAIT_H
#include <sys/wait.h> /* for WIFEXITED and WEXITSTATUS */
-#endif /* HAVE_SYS_WAIT_H - 0 */
+#endif /* HAVE_SYS_WAIT_H */
#ifndef WIFEXITED
#define WIFEXITED(status) (((status) & 0xff) == 0)
@@ -106,37 +108,68 @@ static char privatehid[] = "@(#)private.h 7.54";
#define WEXITSTATUS(status) (((status) >> 8) & 0xff)
#endif /* !defined WEXITSTATUS */
-#if HAVE_UNISTD_H - 0
+#if HAVE_UNISTD_H
#include "unistd.h" /* for F_OK and R_OK */
-#endif /* HAVE_UNISTD_H - 0 */
+#endif /* HAVE_UNISTD_H */
-#if !(HAVE_UNISTD_H - 0)
+#if !HAVE_UNISTD_H
#ifndef F_OK
#define F_OK 0
#endif /* !defined F_OK */
#ifndef R_OK
#define R_OK 4
#endif /* !defined R_OK */
-#endif /* !(HAVE_UNISTD_H - 0) */
+#endif /* !HAVE_UNISTD_H */
-/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */
+/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */
#define is_digit(c) ((unsigned)(c) - '0' <= 9)
/*
+** Define HAVE_STDINT_H's default value here, rather than at the
+** start, since __GLIBC__'s value depends on previously-included
+** files.
+** (glibc 2.1 and later have stdint.h, even with pre-C99 compilers.)
+*/
+#ifndef HAVE_STDINT_H
+#define HAVE_STDINT_H \
+ (199901 <= __STDC_VERSION__ || \
+ 2 < (__GLIBC__ + (0 < __GLIBC_MINOR__)))
+#endif /* !defined HAVE_STDINT_H */
+
+#if HAVE_STDINT_H
+#include "stdint.h"
+#endif /* !HAVE_STDINT_H */
+
+#ifndef INT_FAST64_MAX
+/* Pre-C99 GCC compilers define __LONG_LONG_MAX__ instead of LLONG_MAX. */
+#if defined LLONG_MAX || defined __LONG_LONG_MAX__
+typedef long long int_fast64_t;
+#else /* ! (defined LLONG_MAX || defined __LONG_LONG_MAX__) */
+#if (LONG_MAX >> 31) < 0xffffffff
+Please use a compiler that supports a 64-bit integer type (or wider);
+you may need to compile with "-DHAVE_STDINT_H".
+#endif /* (LONG_MAX >> 31) < 0xffffffff */
+typedef long int_fast64_t;
+#endif /* ! (defined LLONG_MAX || defined __LONG_LONG_MAX__) */
+#endif /* !defined INT_FAST64_MAX */
+
+#ifndef INT32_MAX
+#define INT32_MAX 0x7fffffff
+#endif /* !defined INT32_MAX */
+#ifndef INT32_MIN
+#define INT32_MIN (-1 - INT32_MAX)
+#endif /* !defined INT32_MIN */
+
+/*
** Workarounds for compilers/systems.
*/
/*
-** SunOS 4.1.1 cc lacks prototypes.
+** If your compiler lacks prototypes, "#define P(x) ()".
*/
#ifndef P
-#ifdef __STDC__
#define P(x) x
-#endif /* defined __STDC__ */
-#ifndef __STDC__
-#define P(x) ()
-#endif /* !defined __STDC__ */
#endif /* !defined P */
/*
@@ -208,15 +241,15 @@ extern char * asctime_r();
/*
** Private function declarations.
*/
-char * icalloc P((int nelem, int elsize));
-char * icatalloc P((char * old, const char * new));
-char * icpyalloc P((const char * string));
-char * imalloc P((int n));
-void * irealloc P((void * pointer, int size));
-void icfree P((char * pointer));
-void ifree P((char * pointer));
-char * scheck P((const char *string, const char *format));
+char * icalloc P((int nelem, int elsize));
+char * icatalloc P((char * old, const char * new));
+char * icpyalloc P((const char * string));
+char * imalloc P((int n));
+void * irealloc P((void * pointer, int size));
+void icfree P((char * pointer));
+void ifree P((char * pointer));
+const char * scheck P((const char * string, const char * format));
/*
** Finally, some convenience items.
@@ -238,6 +271,15 @@ char * scheck P((const char *string, const char *format));
#define TYPE_SIGNED(type) (((type) -1) < 0)
#endif /* !defined TYPE_SIGNED */
+/*
+** Since the definition of TYPE_INTEGRAL contains floating point numbers,
+** it cannot be used in preprocessor directives.
+*/
+
+#ifndef TYPE_INTEGRAL
+#define TYPE_INTEGRAL(type) (((type) 0.5) != 0.5)
+#endif /* !defined TYPE_INTEGRAL */
+
#ifndef INT_STRLEN_MAXIMUM
/*
** 302 / 1000 is log10(2.0) rounded up.
@@ -246,7 +288,8 @@ char * scheck P((const char *string, const char *format));
** add one more for a minus sign if the type is signed.
*/
#define INT_STRLEN_MAXIMUM(type) \
- ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + 1 + TYPE_SIGNED(type))
+ ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + \
+ 1 + TYPE_SIGNED(type))
#endif /* !defined INT_STRLEN_MAXIMUM */
/*
@@ -280,11 +323,11 @@ char * scheck P((const char *string, const char *format));
*/
#ifndef _
-#if HAVE_GETTEXT - 0
+#if HAVE_GETTEXT
#define _(msgid) gettext(msgid)
-#else /* !(HAVE_GETTEXT - 0) */
+#else /* !HAVE_GETTEXT */
#define _(msgid) msgid
-#endif /* !(HAVE_GETTEXT - 0) */
+#endif /* !HAVE_GETTEXT */
#endif /* !defined _ */
#ifndef TZ_DOMAIN
@@ -298,6 +341,26 @@ char *asctime_r P((struct tm const *, char *));
char *ctime_r P((time_t const *, char *));
#endif /* HAVE_INCOMPATIBLE_CTIME_R */
+#ifndef YEARSPERREPEAT
+#define YEARSPERREPEAT 400 /* years before a Gregorian repeat */
+#endif /* !defined YEARSPERREPEAT */
+
+/*
+** The Gregorian year averages 365.2425 days, which is 31556952 seconds.
+*/
+
+#ifndef AVGSECSPERYEAR
+#define AVGSECSPERYEAR 31556952L
+#endif /* !defined AVGSECSPERYEAR */
+
+#ifndef SECSPERREPEAT
+#define SECSPERREPEAT ((int_fast64_t) YEARSPERREPEAT * (int_fast64_t) AVGSECSPERYEAR)
+#endif /* !defined SECSPERREPEAT */
+
+#ifndef SECSPERREPEAT_BITS
+#define SECSPERREPEAT_BITS 34 /* ceil(log2(SECSPERREPEAT)) */
+#endif /* !defined SECSPERREPEAT_BITS */
+
/*
** UNIX was a registered trademark of The Open Group in 2003.
*/
diff --git a/timezone/scheck.c b/timezone/scheck.c
index 39feeba..bc15637 100644
--- a/timezone/scheck.c
+++ b/timezone/scheck.c
@@ -1,6 +1,6 @@
#ifndef lint
#ifndef NOID
-static char elsieid[] = "@(#)scheck.c 8.15";
+static char elsieid[] = "@(#)scheck.c 8.17";
#endif /* !defined lint */
#endif /* !defined NOID */
@@ -8,7 +8,7 @@ static char elsieid[] = "@(#)scheck.c 8.15";
#include "private.h"
-char *
+const char *
scheck(string, format)
const char * const string;
const char * const format;
@@ -17,11 +17,10 @@ const char * const format;
register const char * fp;
register char * tp;
register int c;
- register char * result;
+ register const char * result;
char dummy;
- static char nada;
- result = &nada;
+ result = "";
if (string == NULL || format == NULL)
return result;
fbuf = imalloc((int) (2 * strlen(format) + 4));
diff --git a/timezone/solar87 b/timezone/solar87
index 3f32347..7183932 100644
--- a/timezone/solar87
+++ b/timezone/solar87
@@ -1,4 +1,4 @@
-# @(#)solar87 7.3
+# @(#)solar87 8.1
# So much for footnotes about Saudi Arabia.
# Apparent noon times below are for Riyadh; your mileage will vary.
@@ -381,8 +381,8 @@ Rule sol87 1987 only - Dec 31 12:02:45s -0:02:45 -
# Before and after 1987, we'll operate on local mean solar time.
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
-Zone Asia/Riyadh87 3:07:04 - ?? 1987
- 3:07:04 sol87 ?? 1988
- 3:07:04 - ??
+Zone Asia/Riyadh87 3:07:04 - zzz 1987
+ 3:07:04 sol87 zzz 1988
+ 3:07:04 - zzz
# For backward compatibility...
Link Asia/Riyadh87 Mideast/Riyadh87
diff --git a/timezone/solar88 b/timezone/solar88
index 41a64e5..b4cfe8e 100644
--- a/timezone/solar88
+++ b/timezone/solar88
@@ -1,4 +1,4 @@
-# @(#)solar88 7.3
+# @(#)solar88 8.1
# Apparent noon times below are for Riyadh; they're a bit off for other places.
# Times were computed using formulas in the U.S. Naval Observatory's
@@ -381,8 +381,8 @@ Rule sol88 1988 only - Dec 31 12:03:05s -0:03:05 -
# Before and after 1988, we'll operate on local mean solar time.
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
-Zone Asia/Riyadh88 3:07:04 - ?? 1988
- 3:07:04 sol88 ?? 1989
- 3:07:04 - ??
+Zone Asia/Riyadh88 3:07:04 - zzz 1988
+ 3:07:04 sol88 zzz 1989
+ 3:07:04 - zzz
# For backward compatibility...
Link Asia/Riyadh88 Mideast/Riyadh88
diff --git a/timezone/solar89 b/timezone/solar89
index a6d3d71..8c48531 100644
--- a/timezone/solar89
+++ b/timezone/solar89
@@ -1,4 +1,4 @@
-# @(#)solar89 7.4
+# @(#)solar89 8.1
# Apparent noon times below are for Riyadh; they're a bit off for other places.
# Times were computed using a formula provided by the U. S. Naval Observatory:
@@ -386,8 +386,8 @@ Rule sol89 1989 only - Dec 31 12:03:00s -0:03:00 -
# Before and after 1989, we'll operate on local mean solar time.
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
-Zone Asia/Riyadh89 3:07:04 - ?? 1989
- 3:07:04 sol89 ?? 1990
- 3:07:04 - ??
+Zone Asia/Riyadh89 3:07:04 - zzz 1989
+ 3:07:04 sol89 zzz 1990
+ 3:07:04 - zzz
# For backward compatibility...
Link Asia/Riyadh89 Mideast/Riyadh89
diff --git a/timezone/southamerica b/timezone/southamerica
index 9124910..3a61cd7 100644
--- a/timezone/southamerica
+++ b/timezone/southamerica
@@ -1,10 +1,11 @@
-# @(#)southamerica 7.54
+# @(#)southamerica 8.1
+# <pre>
# This data is by no means authoritative; if you think you know better,
# go ahead and edit the file (and please send any changes to
# tz@elsie.nci.nih.gov for general use in the future).
-# From Paul Eggert <eggert@twinsun.com> (1999-07-07):
+# From Paul Eggert (1999-07-07):
# A good source for time zone historical data outside the U.S. is
# Thomas G. Shanks, The International Atlas (5th edition),
# San Diego: ACS Publications, Inc. (1999).
@@ -58,7 +59,7 @@
# From U. S. Naval Observatory (1988-01-199):
# ARGENTINA 3 H BEHIND UTC
-# From Hernan G. Otero <hernan@isoft.com.ar> (1995-06-26):
+# From Hernan G. Otero (1995-06-26):
# I am sending modifications to the Argentine time zone table...
# AR was chosen because they are the ISO letters that represent Argentina.
@@ -86,7 +87,7 @@ Rule Arg 1974 only - Jan 23 0:00 1:00 S
Rule Arg 1974 only - May 1 0:00 0 -
Rule Arg 1988 only - Dec 1 0:00 1:00 S
#
-# From Hernan G. Otero <hernan@isoft.com.ar> (1995-06-26):
+# From Hernan G. Otero (1995-06-26):
# These corrections were contributed by InterSoft Argentina S.A.,
# obtaining the data from the:
# Talleres de Hidrografia Naval Argentina
@@ -96,7 +97,7 @@ Rule Arg 1988 only - Dec 1 0:00 1:00 S
Rule Arg 1989 1993 - Mar Sun>=1 0:00 0 -
Rule Arg 1989 1992 - Oct Sun>=15 0:00 1:00 S
#
-# From Hernan G. Otero <hernan@isoft.com.ar> (1995-06-26):
+# From Hernan G. Otero (1995-06-26):
# From this moment on, the law that mandated the daylight saving
# time corrections was derogated and no more modifications
# to the time zones (for daylight saving) are now made.
@@ -113,7 +114,7 @@ Rule Arg 2000 only - Mar Sun>=1 0:00 0 -
# Argentina decided not to become one of the countries that go on or off DST.
# So Buenos Aires should be -3 hours from GMT at all times.
#
-# From Fabian L. Arce Jofre <farcejofre@bigfoot.com> (2000-04-04):
+# From Fabian L. Arce Jofre (2000-04-04):
# The law that claimed DST for Argentina was derogated by President Fernando
# de la Rua on March 2, 2000, because it would make people spend more energy
# in the winter time, rather than less. The change took effect on March 3.
@@ -293,7 +294,7 @@ Zone America/Argentina/Jujuy -4:21:12 - LMT 1894 Oct 31
-4:00 Arg AR%sT 2000 Mar 3
-3:00 - ART
#
-# Catamarca (CT)
+# Catamarca (CT), Chubut (CH)
Zone America/Argentina/Catamarca -4:23:08 - LMT 1894 Oct 31
-4:16:48 - CMT 1920 May
-4:00 - ART 1930 Dec
@@ -323,20 +324,6 @@ Zone America/Argentina/Mendoza -4:35:16 - LMT 1894 Oct 31
-4:00 - WART 2004 Sep 26
-3:00 - ART
#
-# Chubut (CH)
-# The name "Comodoro Rivadavia" exceeds the 14-byte POSIX limit.
-Zone America/Argentina/ComodRivadavia -4:30:00 - LMT 1894 Oct 31
- -4:16:48 - CMT 1920 May
- -4:00 - ART 1930 Dec
- -4:00 Arg AR%sT 1969 Oct 5
- -3:00 Arg AR%sT 1991 Mar 3
- -4:00 - WART 1991 Oct 20
- -3:00 Arg AR%sT 1999 Oct 3
- -4:00 Arg AR%sT 2000 Mar 3
- -3:00 - ART 2004 Jun 1
- -4:00 - WART 2004 Jun 20
- -3:00 - ART
-#
# Santa Cruz (SC)
Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31
-4:16:48 - CMT 1920 May # Cordoba Mean Time
@@ -374,7 +361,7 @@ Zone America/La_Paz -4:32:36 - LMT 1890
# Brazil
-# From Paul Eggert <eggert@twinsun.com> (1993-11-18):
+# From Paul Eggert (1993-11-18):
# The mayor of Rio recently attempted to change the time zone rules
# just in his city, in order to leave more summer time for the tourist trade.
# The rule change lasted only part of the day;
@@ -532,19 +519,13 @@ Rule Brazil 1996 only - Feb 11 0:00 0 -
# adopted by same states, minus AL, SE.
Rule Brazil 1996 only - Oct 6 0:00 1:00 S
Rule Brazil 1997 only - Feb 16 0:00 0 -
-# From Daniel C. Sobral <dcs@gns.com.br> (1998-02-12):
+# From Daniel C. Sobral (1998-02-12):
# In 1997, the DS began on October 6. The stated reason was that
# because international television networks ignored Brazil's policy on DS,
# they bought the wrong times on satellite for coverage of Pope's visit.
# This year, the ending date of DS was postponed to March 1
# to help dealing with the shortages of electric power.
#
-# From Paul Eggert (1998-02-25):
-# <a href="http://churchnet.ucsm.ac.uk/news/files2/news165.htm">
-# Brazil Prepares for Papal Visit
-# </a>,
-# Church Net UK (1997-10-02).
-#
# Decree 2,317 (1997-09-04), adopted by same states.
Rule Brazil 1997 only - Oct 6 0:00 1:00 S
# Decree <a href="http://pcdsh01.on.br/figuras/HV2495.JPG">2,495</a>
@@ -579,11 +560,12 @@ Rule Brazil 2003 only - Oct 19 0:00 1:00 S
# Decree 5,223 (2004-10-01) reestablishes DST in MT.
# <a href="http://www.planalto.gov.br/ccivil_03/_Ato2004-2006/2004/Decreto/D5223.htm"></a>
Rule Brazil 2004 only - Nov 2 0:00 1:00 S
+# Decree <a href="http://pcdsh01.on.br/DecHV5539.gif">5,539</a> (2005-09-19),
+# adopted by the same states as before.
+Rule Brazil 2005 max - Oct Sun>=15 0:00 1:00 S
# The latest ruleset listed above says that the following states observe DST:
# DF, ES, GO, MG, MS, MT, PR, RJ, RS, SC, SP.
-#
-Rule Brazil 2005 max - Oct Sun>=15 0:00 1:00 S
-# For dates after mid-2005, the above rules with TO="max" are guesses
+# For dates after mid-2006, the above rules with TO="max" are guesses
# and are quite possibly wrong, but are more likely than no DST at all.
@@ -671,7 +653,7 @@ Zone America/Campo_Grande -3:38:28 - LMT 1914
# Mato Grosso (MT)
Zone America/Cuiaba -3:44:20 - LMT 1914
-4:00 Brazil AM%sT 2003 Sep 24
- -4:00 - AMT 2004 Oct 4
+ -4:00 - AMT 2004 Oct 1
-4:00 Brazil AM%sT
#
# west Para (PA), Rondonia (RO)
@@ -942,9 +924,16 @@ Rule Para 1998 2001 - Mar Sun>=1 0:00 0 -
# A decree was issued in Paraguay (no. 16350) on 2002-02-26 that changed the
# dst method to be from the first Sunday in September to the first Sunday in
# April.
-Rule Para 2002 max - Apr Sun>=1 0:00 0 -
-Rule Para 2002 max - Sep Sun>=1 0:00 1:00 S
-
+Rule Para 2002 2004 - Apr Sun>=1 0:00 0 -
+Rule Para 2002 2003 - Sep Sun>=1 0:00 1:00 S
+#
+# From Jesper Norgaard Welen (2005-01-02):
+# There are several sources that claim that Paraguay made
+# a timezone rule change in autumn 2004.
+# From Steffen Thorsen (2005-01-05):
+# Decree 1,867 (2004-03-05) <http://www.labor.com.py/noticias.asp?id=27>
+Rule Para 2004 max - Oct Sun>=15 0:00 1:00 S
+Rule Para 2005 max - Mar Sun>=8 0:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Asuncion -3:50:40 - LMT 1890
@@ -957,7 +946,7 @@ Zone America/Asuncion -3:50:40 - LMT 1890
#
# <a href="news:xrGmb.39935$gA1.13896113@news4.srv.hcvlny.cv.net">
# From Evelyn C. Leeper via Mark Brader (2003-10-26):</a>
-# When we were in Peru in 1985-1986, they apparently switched over
+# When we were in Peru in 1985-1986, they apparently switched over
# sometime between December 29 and January 3 while we were on the Amazon.
#
# From Paul Eggert (2003-11-02):
@@ -1003,7 +992,7 @@ Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2
-4:00 - AST
# Uruguay
-# From Paul Eggert <eggert@twinsun.com> (1993-11-18):
+# From Paul Eggert (1993-11-18):
# Uruguay wins the prize for the strangest peacetime manipulation of the rules.
# From Shanks:
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
@@ -1056,8 +1045,18 @@ Rule Uruguay 1993 only - Feb 28 0:00 0 -
# From Eduardo Cota (2004-09-20):
# The uruguayan government has decreed a change in the local time....
# http://www.presidencia.gub.uy/decretos/2004091502.htm
-Rule Uruguay 2004 only - Sep Sun>=15 0:00 1:00 S
-Rule Uruguay 2005 only - Mar Sun>=8 0:00 0 -
+Rule Uruguay 2004 only - Sep 19 0:00 1:00 S
+# From Steffen Thorsen (2005-03-11):
+# Uruguay's DST was scheduled to end on Sunday, 2005-03-13, but in order to
+# save energy ... it was postponed two weeks....
+# http://www.presidencia.gub.uy/_Web/noticias/2005/03/2005031005.htm
+Rule Uruguay 2005 only - Mar 27 2:00 0 -
+# From Eduardo Cota (2005-09-27):
+# http://www.presidencia.gub.uy/_Web/decretos/2005/09/CM%20119_09%2009%202005_00001.PDF
+# This means that from 2005-10-09 at 02:00 local time, until 2006-03-12 at
+# 02:00 local time, official time in Uruguay will be at GMT -2.
+Rule Uruguay 2005 only - Oct 9 2:00 1:00 S
+Rule Uruguay 2006 only - Mar 12 2:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone America/Montevideo -3:44:44 - LMT 1898 Jun 28
-3:44:44 - MMT 1920 May 1 # Montevideo MT
diff --git a/timezone/systemv b/timezone/systemv
index c6a6b64..6cf9645 100644
--- a/timezone/systemv
+++ b/timezone/systemv
@@ -1,24 +1,24 @@
-# @(#)systemv 7.3
+# @(#)systemv 8.1
# Old rules, should the need arise.
# No attempt is made to handle Newfoundland, since it cannot be expressed
# using the System V "TZ" scheme (half-hour offset), or anything outside
# North America (no support for non-standard DST start/end dates), nor
-# the change in the DST rules in the US in 1987 (which occurred before
+# the changes in the DST rules in the US after 1976 (which occurred after
# the old rules were written).
#
-# If you need the old rules, uncomment ## lines and comment-out Link lines.
+# If you need the old rules, uncomment ## lines.
# Compile this *without* leap second correction for true conformance.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-## Rule SystemV min 1973 - Apr lastSun 2:00 1:00 D
-## Rule SystemV min 1973 - Oct lastSun 2:00 0 S
-## Rule SystemV 1974 only - Jan 6 2:00 1:00 D
-## Rule SystemV 1974 only - Nov lastSun 2:00 0 S
-## Rule SystemV 1975 only - Feb 23 2:00 1:00 D
-## Rule SystemV 1975 only - Oct lastSun 2:00 0 S
-## Rule SystemV 1976 max - Apr lastSun 2:00 1:00 D
-## Rule SystemV 1976 max - Oct lastSun 2:00 0 S
+Rule SystemV min 1973 - Apr lastSun 2:00 1:00 D
+Rule SystemV min 1973 - Oct lastSun 2:00 0 S
+Rule SystemV 1974 only - Jan 6 2:00 1:00 D
+Rule SystemV 1974 only - Nov lastSun 2:00 0 S
+Rule SystemV 1975 only - Feb 23 2:00 1:00 D
+Rule SystemV 1975 only - Oct lastSun 2:00 0 S
+Rule SystemV 1976 max - Apr lastSun 2:00 1:00 D
+Rule SystemV 1976 max - Oct lastSun 2:00 0 S
# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
## Zone SystemV/AST4ADT -4:00 SystemV A%sT
@@ -34,17 +34,3 @@
## Zone SystemV/PST8 -8:00 - PST
## Zone SystemV/YST9 -9:00 - YST
## Zone SystemV/HST10 -10:00 - HST
-# For now...
-Link America/Halifax SystemV/AST4ADT
-Link America/New_York SystemV/EST5EDT
-Link America/Chicago SystemV/CST6CDT
-Link America/Denver SystemV/MST7MDT
-Link America/Los_Angeles SystemV/PST8PDT
-Link America/Anchorage SystemV/YST9YDT
-Link America/Puerto_Rico SystemV/AST4
-Link America/Indianapolis SystemV/EST5
-Link America/Regina SystemV/CST6
-Link America/Phoenix SystemV/MST7
-Link Pacific/Pitcairn SystemV/PST8
-Link Pacific/Gambier SystemV/YST9
-Link Pacific/Honolulu SystemV/HST10
diff --git a/timezone/tst-timezone.c b/timezone/tst-timezone.c
index 127956d..4c87916 100644
--- a/timezone/tst-timezone.c
+++ b/timezone/tst-timezone.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Andreas Jaeger <aj@suse.de>, 1998.
@@ -42,9 +42,9 @@ static const struct test_times tests[] =
{ "Australia/Melbourne", 1, -36000, { "EST", "EST" }},
{ "America/Sao_Paulo", 1, 10800, {"BRT", "BRST" }},
{ "America/Chicago", 1, 21600, {"CST", "CDT" }},
- { "America/Indianapolis", 1, 18000, {"EST", "EDT" }},
+ { "America/Indiana/Indianapolis", 1, 18000, {"EST", "EDT" }},
{ "America/Los_Angeles", 1, 28800, {"PST", "PDT" }},
- { "Asia/Tokyo", 0, -32400, {"JST", "JST" }},
+ { "Asia/Tokyo", 1, -32400, {"JST", "JDT" }},
{ "Pacific/Auckland", 1, -43200, { "NZST", "NZDT" }},
{ NULL, 0, 0 }
};
diff --git a/timezone/tzfile.h b/timezone/tzfile.h
index 0921c3c..3a9eee3 100644
--- a/timezone/tzfile.h
+++ b/timezone/tzfile.h
@@ -4,7 +4,7 @@
/*
** This file is in the public domain, so clarified as of
-** 1996-06-05 by Arthur David Olson (arthur_david_olson@nih.gov).
+** 1996-06-05 by Arthur David Olson.
*/
/*
@@ -21,7 +21,7 @@
#ifndef lint
#ifndef NOID
-static char tzfilehid[] = "@(#)tzfile.h 7.14";
+static char tzfilehid[] = "@(#)tzfile.h 8.1";
#endif /* !defined NOID */
#endif /* !defined lint */
@@ -48,8 +48,9 @@ static char tzfilehid[] = "@(#)tzfile.h 7.14";
#define TZ_MAGIC "TZif"
struct tzhead {
- char tzh_magic[4]; /* TZ_MAGIC */
- char tzh_reserved[16]; /* reserved for future use */
+ char tzh_magic[4]; /* TZ_MAGIC */
+ char tzh_version[1]; /* '\0' or '2' as of 2005 */
+ char tzh_reserved[15]; /* reserved--must be zero */
char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */
char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */
char tzh_leapcnt[4]; /* coded number of leap seconds */
@@ -84,18 +85,22 @@ struct tzhead {
*/
/*
+** If tzh_version is '2' or greater, the above is followed by a second instance
+** of tzhead and a second instance of the data in which each coded transition
+** time uses 8 rather than 4 chars,
+** then a POSIX-TZ-environment-variable-style string for use in handling
+** instants after the last transition time stored in the file
+** (with nothing between the newlines if there is no POSIX representation for
+** such instants).
+*/
+
+/*
** In the current implementation, "tzset()" refuses to deal with files that
** exceed any of the limits below.
*/
#ifndef TZ_MAX_TIMES
-/*
-** The TZ_MAX_TIMES value below is enough to handle a bit more than a
-** year's worth of solar time (corrected daily to the nearest second) or
-** 138 years of Pacific Presidential Election time
-** (where there are three time zone transitions every fourth year).
-*/
-#define TZ_MAX_TIMES 370
+#define TZ_MAX_TIMES 1200
#endif /* !defined TZ_MAX_TIMES */
#ifndef TZ_MAX_TYPES
@@ -105,7 +110,7 @@ struct tzhead {
#ifdef NOSOLAR
/*
** Must be at least 14 for Europe/Riga as of Jan 12 1995,
-** as noted by Earl Chew <earl@hpato.aus.hp.com>.
+** as noted by Earl Chew.
*/
#define TZ_MAX_TYPES 20 /* Maximum number of local time types */
#endif /* !defined NOSOLAR */
@@ -156,33 +161,20 @@ struct tzhead {
#define EPOCH_YEAR 1970
#define EPOCH_WDAY TM_THURSDAY
-/*
-** Accurate only for the past couple of centuries;
-** that will probably do.
-*/
-
#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
-#ifndef USG
-
/*
-** Use of the underscored variants may cause problems if you move your code to
-** certain System-V-based systems; for maximum portability, use the
-** underscore-free variants. The underscored variants are provided for
-** backward compatibility only; they may disappear from future versions of
-** this file.
+** Since everything in isleap is modulo 400 (or a factor of 400), we know that
+** isleap(y) == isleap(y % 400)
+** and so
+** isleap(a + b) == isleap((a + b) % 400)
+** or
+** isleap(a + b) == isleap(a % 400 + b % 400)
+** This is true even if % means modulo rather than Fortran remainder
+** (which is allowed by C89 but not C99).
+** We use this to avoid addition overflow problems.
*/
-#define SECS_PER_MIN SECSPERMIN
-#define MINS_PER_HOUR MINSPERHOUR
-#define HOURS_PER_DAY HOURSPERDAY
-#define DAYS_PER_WEEK DAYSPERWEEK
-#define DAYS_PER_NYEAR DAYSPERNYEAR
-#define DAYS_PER_LYEAR DAYSPERLYEAR
-#define SECS_PER_HOUR SECSPERHOUR
-#define SECS_PER_DAY SECSPERDAY
-#define MONS_PER_YEAR MONSPERYEAR
-
-#endif /* !defined USG */
+#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400)
#endif /* !defined TZFILE_H */
diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
index be58924..f6e28bf 100644
--- a/timezone/tzselect.ksh
+++ b/timezone/tzselect.ksh
@@ -1,11 +1,11 @@
#! @KSH@
-# '@(#)tzselect.ksh 1.7'
+# '@(#)tzselect.ksh 1.8'
# Ask the user about the time zone, and output the resulting TZ value to stdout.
# Interact with the user via stderr and stdin.
-# Contributed by Paul Eggert <eggert@twinsun.com>.
+# Contributed by Paul Eggert.
# Porting notes:
#
diff --git a/timezone/yearistype b/timezone/yearistype
index 8d796f1..d3a2480 100755
--- a/timezone/yearistype
+++ b/timezone/yearistype
@@ -1,6 +1,6 @@
#! /bin/sh
-: '@(#)yearistype.sh 7.7'
+: '@(#)yearistype.sh 7.8'
case $#-$1 in
2-|2-0*|2-*[!0-9]*)
@@ -9,7 +9,7 @@ case $#-$1 in
esac
case $#-$2 in
- 2-even)
+ 2-even)
case $1 in
*[24680]) exit 0 ;;
*) exit 1 ;;
@@ -19,7 +19,7 @@ case $#-$2 in
*[02468][048]|*[13579][26]) exit 1 ;;
*) exit 0 ;;
esac ;;
- 2-odd)
+ 2-odd)
case $1 in
*[13579]) exit 0 ;;
*) exit 1 ;;
@@ -29,7 +29,7 @@ case $#-$2 in
*[02468][048]|*[13579][26]) exit 0 ;;
*) exit 1 ;;
esac ;;
- 2-*)
+ 2-*)
echo "$0: wild type - $2" >&2 ;;
esac
diff --git a/timezone/zdump.c b/timezone/zdump.c
index 20bb916..3c8d179 100644
--- a/timezone/zdump.c
+++ b/timezone/zdump.c
@@ -1,4 +1,4 @@
-static char elsieid[] = "@(#)zdump.c 7.40";
+static char elsieid[] = "@(#)zdump.c 8.2";
/*
** This code has been made independent of the rest of the time
@@ -11,6 +11,19 @@ static char elsieid[] = "@(#)zdump.c 7.40";
#include "sys/types.h" /* for time_t */
#include "time.h" /* for struct tm */
#include "stdlib.h" /* for exit, malloc, atoi */
+#include "float.h" /* for FLT_MAX and DBL_MAX */
+#include "ctype.h" /* for isalpha et al. */
+#ifndef isascii
+#define isascii(x) 1
+#endif /* !defined isascii */
+
+#ifndef ZDUMP_LO_YEAR
+#define ZDUMP_LO_YEAR (-500)
+#endif /* !defined ZDUMP_LO_YEAR */
+
+#ifndef ZDUMP_HI_YEAR
+#define ZDUMP_HI_YEAR 2500
+#endif /* !defined ZDUMP_HI_YEAR */
#ifndef MAX_STRING_LENGTH
#define MAX_STRING_LENGTH 1024
@@ -61,9 +74,20 @@ static char elsieid[] = "@(#)zdump.c 7.40";
#endif /* !defined DAYSPERNYEAR */
#ifndef isleap
-#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
+#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
#endif /* !defined isleap */
+#ifndef isleap_sum
+/*
+** See tzfile.h for details on isleap_sum.
+*/
+#define isleap_sum(a, b) isleap((a) % 400 + (b) % 400)
+#endif /* !defined isleap_sum */
+
+#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY)
+#define SECSPERNYEAR (SECSPERDAY * DAYSPERNYEAR)
+#define SECSPERLYEAR (SECSPERNYEAR + SECSPERDAY)
+
#if HAVE_GETTEXT
#include "locale.h" /* for setlocale */
#include "libintl.h"
@@ -106,27 +130,106 @@ static char elsieid[] = "@(#)zdump.c 7.40";
#endif /* !defined TZ_DOMAIN */
#ifndef P
-#ifdef __STDC__
#define P(x) x
-#else /* !defined __STDC__ */
-#define P(x) ()
-#endif /* !defined __STDC__ */
#endif /* !defined P */
extern char ** environ;
extern int getopt P((int argc, char * const argv[],
- const char * options));
+ const char * options));
extern char * optarg;
extern int optind;
extern char * tzname[2];
+static time_t absolute_min_time;
+static time_t absolute_max_time;
+static size_t longest;
+static char * progname;
+static int warned;
+
static char * abbr P((struct tm * tmp));
+static void abbrok P((const char * abbrp, const char * zone));
static long delta P((struct tm * newp, struct tm * oldp));
+static void dumptime P((const struct tm * tmp));
static time_t hunt P((char * name, time_t lot, time_t hit));
-static size_t longest;
-static char * progname;
+static void setabsolutes P((void));
static void show P((char * zone, time_t t, int v));
-static void dumptime P((const struct tm * tmp));
+static const char * tformat P((void));
+static time_t yeartot P((long y));
+
+#ifndef TYPECHECK
+#define my_localtime localtime
+#else /* !defined TYPECHECK */
+static struct tm *
+my_localtime(tp)
+time_t * tp;
+{
+ register struct tm * tmp;
+
+ tmp = localtime(tp);
+ if (tp != NULL && tmp != NULL) {
+ struct tm tm;
+ register time_t t;
+
+ tm = *tmp;
+ t = mktime(&tm);
+ if (t - *tp >= 1 || *tp - t >= 1) {
+ (void) fflush(stdout);
+ (void) fprintf(stderr, "\n%s: ", progname);
+ (void) fprintf(stderr, tformat(), *tp);
+ (void) fprintf(stderr, " ->");
+ (void) fprintf(stderr, " year=%d", tmp->tm_year);
+ (void) fprintf(stderr, " mon=%d", tmp->tm_mon);
+ (void) fprintf(stderr, " mday=%d", tmp->tm_mday);
+ (void) fprintf(stderr, " hour=%d", tmp->tm_hour);
+ (void) fprintf(stderr, " min=%d", tmp->tm_min);
+ (void) fprintf(stderr, " sec=%d", tmp->tm_sec);
+ (void) fprintf(stderr, " isdst=%d", tmp->tm_isdst);
+ (void) fprintf(stderr, " -> ");
+ (void) fprintf(stderr, tformat(), t);
+ (void) fprintf(stderr, "\n");
+ }
+ }
+ return tmp;
+}
+#endif /* !defined TYPECHECK */
+
+static void
+abbrok(abbrp, zone)
+const char * const abbrp;
+const char * const zone;
+{
+ register const char * cp;
+ register char * wp;
+
+ if (warned)
+ return;
+ cp = abbrp;
+ wp = NULL;
+ while (isascii((unsigned char) *cp) && isalpha((unsigned char) *cp))
+ ++cp;
+ if (cp - abbrp == 0)
+ wp = _("lacks alphabetic at start");
+ else if (cp - abbrp < 3)
+ wp = _("has fewer than 3 alphabetics");
+ else if (cp - abbrp > 6)
+ wp = _("has more than 6 alphabetics");
+ if (wp == NULL && (*cp == '+' || *cp == '-')) {
+ ++cp;
+ if (isascii((unsigned char) *cp) &&
+ isdigit((unsigned char) *cp))
+ if (*cp++ == '1' && *cp >= '0' && *cp <= '4')
+ ++cp;
+ if (*cp != '\0')
+ wp = _("differs from POSIX standard");
+ }
+ if (wp == NULL)
+ return;
+ (void) fflush(stdout);
+ (void) fprintf(stderr,
+ _("%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"),
+ progname, zone, abbrp, wp);
+ warned = TRUE;
+}
int
main(argc, argv)
@@ -136,20 +239,24 @@ char * argv[];
register int i;
register int c;
register int vflag;
- register char * cutoff;
- register int cutyear;
- register long cuttime;
- char ** fakeenv;
+ register char * cutarg;
+ register long cutloyear = ZDUMP_LO_YEAR;
+ register long cuthiyear = ZDUMP_HI_YEAR;
+ register time_t cutlotime;
+ register time_t cuthitime;
+ register char ** fakeenv;
time_t now;
time_t t;
time_t newt;
- time_t hibit;
struct tm tm;
struct tm newtm;
+ register struct tm * tmp;
+ register struct tm * newtmp;
- INITIALIZE(cuttime);
+ INITIALIZE(cutlotime);
+ INITIALIZE(cuthitime);
#if HAVE_GETTEXT
- (void) setlocale(LC_MESSAGES, "");
+ (void) setlocale(LC_ALL, "");
#ifdef TZ_DOMAINDIR
(void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
#endif /* defined TEXTDOMAINDIR */
@@ -159,49 +266,60 @@ char * argv[];
for (i = 1; i < argc; ++i)
if (strcmp(argv[i], "--version") == 0) {
(void) printf("%s\n", elsieid);
- (void) exit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
vflag = 0;
- cutoff = NULL;
+ cutarg = NULL;
while ((c = getopt(argc, argv, "c:v")) == 'c' || c == 'v')
if (c == 'v')
vflag = 1;
- else cutoff = optarg;
+ else cutarg = optarg;
if ((c != EOF && c != -1) ||
(optind == argc - 1 && strcmp(argv[optind], "=") == 0)) {
(void) fprintf(stderr,
-_("%s: usage is %s [ --version ] [ -v ] [ -c cutoff ] zonename ...\n"),
- argv[0], argv[0]);
- (void) exit(EXIT_FAILURE);
+_("%s: usage is %s [ --version ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"),
+ progname, progname);
+ exit(EXIT_FAILURE);
}
- if (cutoff != NULL) {
- int y;
-
- cutyear = atoi(cutoff);
- cuttime = 0;
- for (y = EPOCH_YEAR; y < cutyear; ++y)
- cuttime += DAYSPERNYEAR + isleap(y);
- cuttime *= SECSPERHOUR * HOURSPERDAY;
+ if (vflag) {
+ if (cutarg != NULL) {
+ long lo;
+ long hi;
+ char dummy;
+
+ if (sscanf(cutarg, "%ld%c", &hi, &dummy) == 1) {
+ cuthiyear = hi;
+ } else if (sscanf(cutarg, "%ld,%ld%c",
+ &lo, &hi, &dummy) == 2) {
+ cutloyear = lo;
+ cuthiyear = hi;
+ } else {
+(void) fprintf(stderr, _("%s: wild -c argument %s\n"),
+ progname, cutarg);
+ exit(EXIT_FAILURE);
+ }
+ }
+ setabsolutes();
+ cutlotime = yeartot(cutloyear);
+ cuthitime = yeartot(cuthiyear);
}
(void) time(&now);
longest = 0;
for (i = optind; i < argc; ++i)
if (strlen(argv[i]) > longest)
longest = strlen(argv[i]);
- for (hibit = 1; (hibit << 1) != 0; hibit <<= 1)
- continue;
{
register int from;
register int to;
- for (i = 0; environ[i] != NULL; ++i)
+ for (i = 0; environ[i] != NULL; ++i)
continue;
fakeenv = (char **) malloc((size_t) ((i + 2) *
sizeof *fakeenv));
if (fakeenv == NULL ||
(fakeenv[0] = (char *) malloc(longest + 4)) == NULL) {
(void) perror(progname);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
to = 0;
(void) strcpy(fakeenv[to++], "TZ=");
@@ -219,85 +337,175 @@ _("%s: usage is %s [ --version ] [ -v ] [ -c cutoff ] zonename ...\n"),
show(argv[i], now, FALSE);
continue;
}
- /*
- ** Get lowest value of t.
- */
- t = hibit;
- if (t > 0) /* time_t is unsigned */
- t = 0;
+ warned = FALSE;
+ t = absolute_min_time;
show(argv[i], t, TRUE);
t += SECSPERHOUR * HOURSPERDAY;
show(argv[i], t, TRUE);
- tm = *localtime(&t);
- (void) strncpy(buf, abbr(&tm), (sizeof buf) - 1);
+ if (t < cutlotime)
+ t = cutlotime;
+ tmp = my_localtime(&t);
+ if (tmp != NULL) {
+ tm = *tmp;
+ (void) strncpy(buf, abbr(&tm), (sizeof buf) - 1);
+ }
for ( ; ; ) {
- if (cutoff != NULL && t >= cuttime)
+ if (t >= cuthitime)
break;
newt = t + SECSPERHOUR * 12;
- if (cutoff != NULL && newt >= cuttime)
+ if (newt >= cuthitime)
break;
if (newt <= t)
break;
- newtm = *localtime(&newt);
- if (delta(&newtm, &tm) != (newt - t) ||
+ newtmp = localtime(&newt);
+ if (newtmp != NULL)
+ newtm = *newtmp;
+ if ((tmp == NULL || newtmp == NULL) ? (tmp != newtmp) :
+ (delta(&newtm, &tm) != (newt - t) ||
newtm.tm_isdst != tm.tm_isdst ||
- strcmp(abbr(&newtm), buf) != 0) {
+ strcmp(abbr(&newtm), buf) != 0)) {
newt = hunt(argv[i], t, newt);
- newtm = *localtime(&newt);
- (void) strncpy(buf, abbr(&newtm),
- (sizeof buf) - 1);
+ newtmp = localtime(&newt);
+ if (newtmp != NULL) {
+ newtm = *newtmp;
+ (void) strncpy(buf,
+ abbr(&newtm),
+ (sizeof buf) - 1);
+ }
}
t = newt;
tm = newtm;
+ tmp = newtmp;
}
- /*
- ** Get highest value of t.
- */
- t = ~((time_t) 0);
- if (t < 0) /* time_t is signed */
- t &= ~hibit;
+ t = absolute_max_time;
t -= SECSPERHOUR * HOURSPERDAY;
show(argv[i], t, TRUE);
t += SECSPERHOUR * HOURSPERDAY;
show(argv[i], t, TRUE);
}
if (fflush(stdout) || ferror(stdout)) {
- (void) fprintf(stderr, "%s: ", argv[0]);
- (void) perror(_("Error writing standard output"));
- (void) exit(EXIT_FAILURE);
+ (void) fprintf(stderr, "%s: ", progname);
+ (void) perror(_("Error writing to standard output"));
+ exit(EXIT_FAILURE);
}
exit(EXIT_SUCCESS);
+ /* If exit fails to exit... */
+ return EXIT_FAILURE;
+}
+
+static void
+setabsolutes()
+{
+ if (0.5 == (time_t) 0.5) {
+ /*
+ ** time_t is floating.
+ */
+ if (sizeof (time_t) == sizeof (float)) {
+ absolute_min_time = (time_t) -FLT_MAX;
+ absolute_max_time = (time_t) FLT_MAX;
+ } else if (sizeof (time_t) == sizeof (double)) {
+ absolute_min_time = (time_t) -DBL_MAX;
+ absolute_max_time = (time_t) DBL_MAX;
+ } else {
+ (void) fprintf(stderr,
+_("%s: use of -v on system with floating time_t other than float or double\n"),
+ progname);
+ exit(EXIT_FAILURE);
+ }
+ } else if (0 > (time_t) -1) {
+ /*
+ ** time_t is signed. Assume overflow wraps around.
+ */
+ time_t t = 0;
+ time_t t1 = 1;
+
+ while (t < t1) {
+ t = t1;
+ t1 = 2 * t1 + 1;
+ }
+
+ absolute_max_time = t;
+ t = -t;
+ absolute_min_time = t - 1;
+ if (t < absolute_min_time)
+ absolute_min_time = t;
+ } else {
+ /*
+ ** time_t is unsigned.
+ */
+ absolute_min_time = 0;
+ absolute_max_time = absolute_min_time - 1;
+ }
+}
- /* gcc -Wall pacifier */
- for ( ; ; )
- continue;
+static time_t
+yeartot(y)
+const long y;
+{
+ register long myy;
+ register long seconds;
+ register time_t t;
+
+ myy = EPOCH_YEAR;
+ t = 0;
+ while (myy != y) {
+ if (myy < y) {
+ seconds = isleap(myy) ? SECSPERLYEAR : SECSPERNYEAR;
+ ++myy;
+ if (t > absolute_max_time - seconds) {
+ t = absolute_max_time;
+ break;
+ }
+ t += seconds;
+ } else {
+ --myy;
+ seconds = isleap(myy) ? SECSPERLYEAR : SECSPERNYEAR;
+ if (t < absolute_min_time + seconds) {
+ t = absolute_min_time;
+ break;
+ }
+ t -= seconds;
+ }
+ }
+ return t;
}
static time_t
-hunt(name, lot, hit)
-char * name;
-time_t lot;
-time_t hit;
+hunt(char *name, time_t lot, time_t hit)
{
- time_t t;
- struct tm lotm;
- struct tm tm;
- static char loab[MAX_STRING_LENGTH];
-
- lotm = *localtime(&lot);
- (void) strncpy(loab, abbr(&lotm), (sizeof loab) - 1);
- while ((hit - lot) >= 2) {
- t = lot / 2 + hit / 2;
+ time_t t;
+ long diff;
+ struct tm lotm;
+ register struct tm * lotmp;
+ struct tm tm;
+ register struct tm * tmp;
+ char loab[MAX_STRING_LENGTH];
+
+ lotmp = my_localtime(&lot);
+ if (lotmp != NULL) {
+ lotm = *lotmp;
+ (void) strncpy(loab, abbr(&lotm), (sizeof loab) - 1);
+ }
+ for ( ; ; ) {
+ diff = (long) (hit - lot);
+ if (diff < 2)
+ break;
+ t = lot;
+ t += diff / 2;
if (t <= lot)
++t;
else if (t >= hit)
--t;
- tm = *localtime(&t);
- if (delta(&tm, &lotm) == (t - lot) &&
+ tmp = my_localtime(&t);
+ if (tmp != NULL)
+ tm = *tmp;
+ if ((lotmp == NULL || tmp == NULL) ? (lotmp == tmp) :
+ (delta(&tm, &lotm) == (t - lot) &&
tm.tm_isdst == lotm.tm_isdst &&
- strcmp(abbr(&tm), loab) == 0) {
+ strcmp(abbr(&tm), loab) == 0)) {
lot = t;
lotm = tm;
+ lotmp = tmp;
} else hit = t;
}
show(name, lot, TRUE);
@@ -306,7 +514,7 @@ time_t hit;
}
/*
-** Thanks to Paul Eggert (eggert@twinsun.com) for logic used in delta.
+** Thanks to Paul Eggert for logic used in delta.
*/
static long
@@ -314,14 +522,14 @@ delta(newp, oldp)
struct tm * newp;
struct tm * oldp;
{
- long result;
- int tmy;
+ register long result;
+ register int tmy;
if (newp->tm_year < oldp->tm_year)
return -delta(oldp, newp);
result = 0;
for (tmy = oldp->tm_year; tmy < newp->tm_year; ++tmy)
- result += DAYSPERNYEAR + isleap(tmy + (long) TM_YEAR_BASE);
+ result += DAYSPERNYEAR + isleap_sum(tmy, TM_YEAR_BASE);
result += newp->tm_yday - oldp->tm_yday;
result *= HOURSPERDAY;
result += newp->tm_hour - oldp->tm_hour;
@@ -333,29 +541,36 @@ struct tm * oldp;
}
static void
-show(zone, t, v)
-char * zone;
-time_t t;
-int v;
+show(char *zone, time_t t, int v)
{
- struct tm * tmp;
+ register struct tm * tmp;
(void) printf("%-*s ", (int) longest, zone);
if (v) {
- dumptime(gmtime(&t));
- (void) printf(" UTC = ");
+ tmp = gmtime(&t);
+ if (tmp == NULL) {
+ (void) printf(tformat(), t);
+ } else {
+ dumptime(tmp);
+ (void) printf(" UTC");
+ }
+ (void) printf(" = ");
}
- tmp = localtime(&t);
+ tmp = my_localtime(&t);
dumptime(tmp);
- if (*abbr(tmp) != '\0')
- (void) printf(" %s", abbr(tmp));
- if (v) {
- (void) printf(" isdst=%d", tmp->tm_isdst);
+ if (tmp != NULL) {
+ if (*abbr(tmp) != '\0')
+ (void) printf(" %s", abbr(tmp));
+ if (v) {
+ (void) printf(" isdst=%d", tmp->tm_isdst);
#ifdef TM_GMTOFF
- (void) printf(" gmtoff=%ld", tmp->TM_GMTOFF);
+ (void) printf(" gmtoff=%ld", tmp->TM_GMTOFF);
#endif /* defined TM_GMTOFF */
+ }
}
(void) printf("\n");
+ if (tmp != NULL && *abbr(tmp) != '\0')
+ abbrok(abbr(tmp), zone);
}
static char *
@@ -371,6 +586,33 @@ struct tm * tmp;
return (result == NULL) ? &nada : result;
}
+/*
+** The code below can fail on certain theoretical systems;
+** it works on all known real-world systems as of 2004-12-30.
+*/
+
+static const char *
+tformat()
+{
+ if (0.5 == (time_t) 0.5) { /* floating */
+ if (sizeof (time_t) > sizeof (double))
+ return "%Lg";
+ return "%g";
+ }
+ if (0 > (time_t) -1) { /* signed */
+ if (sizeof (time_t) > sizeof (long))
+ return "%lld";
+ if (sizeof (time_t) > sizeof (int))
+ return "%ld";
+ return "%d";
+ }
+ if (sizeof (time_t) > sizeof (unsigned long))
+ return "%llu";
+ if (sizeof (time_t) > sizeof (unsigned int))
+ return "%lu";
+ return "%u";
+}
+
static void
dumptime(timeptr)
register const struct tm * timeptr;
@@ -384,7 +626,13 @@ register const struct tm * timeptr;
};
register const char * wn;
register const char * mn;
+ register int lead;
+ register int trail;
+ if (timeptr == NULL) {
+ (void) printf("NULL");
+ return;
+ }
/*
** The packaged versions of localtime and gmtime never put out-of-range
** values in tm_wday or tm_mon, but since this code might be compiled
@@ -398,9 +646,23 @@ register const struct tm * timeptr;
(int) (sizeof mon_name / sizeof mon_name[0]))
mn = "???";
else mn = mon_name[timeptr->tm_mon];
- (void) printf("%.3s %.3s%3d %.2d:%.2d:%.2d %ld",
+ (void) printf("%.3s %.3s%3d %.2d:%.2d:%.2d ",
wn, mn,
timeptr->tm_mday, timeptr->tm_hour,
- timeptr->tm_min, timeptr->tm_sec,
- timeptr->tm_year + (long) TM_YEAR_BASE);
+ timeptr->tm_min, timeptr->tm_sec);
+#define DIVISOR 10
+ trail = timeptr->tm_year % DIVISOR + TM_YEAR_BASE % DIVISOR;
+ lead = timeptr->tm_year / DIVISOR + TM_YEAR_BASE / DIVISOR +
+ trail / DIVISOR;
+ trail %= DIVISOR;
+ if (trail < 0 && lead > 0) {
+ trail += DIVISOR;
+ --lead;
+ } else if (lead < 0 && trail > 0) {
+ trail -= DIVISOR;
+ ++lead;
+ }
+ if (lead == 0)
+ (void) printf("%d", trail);
+ else (void) printf("%d%d", lead, ((trail < 0) ? -trail : trail));
}
diff --git a/timezone/zic.c b/timezone/zic.c
index 9bb8662..f7393ea 100644
--- a/timezone/zic.c
+++ b/timezone/zic.c
@@ -1,9 +1,22 @@
-static char elsieid[] = "@(#)zic.c 7.116";
+/*
+** This file is in the public domain, so clarified as of
+** 2006-07-17 by Arthur David Olson.
+*/
+
+static char elsieid[] = "@(#)zic.c 8.7";
#include "private.h"
#include "locale.h"
#include "tzfile.h"
+#define ZIC_VERSION '2'
+
+typedef int_fast64_t zic_t;
+
+#ifndef ZIC_MAX_ABBR_LEN_WO_WARN
+#define ZIC_MAX_ABBR_LEN_WO_WARN 6
+#endif /* !defined ZIC_MAX_ABBR_LEN_WO_WARN */
+
#if HAVE_SYS_STAT_H
#include "sys/stat.h"
#endif
@@ -15,7 +28,7 @@ static char elsieid[] = "@(#)zic.c 7.116";
/*
** On some ancient hosts, predicates like `isspace(C)' are defined
-** only if isascii(C) || C == EOF. Modern hosts obey the C Standard,
+** only if isascii(C) || C == EOF. Modern hosts obey the C Standard,
** which says they are defined only if C == ((unsigned char) C) || C == EOF.
** Neither the C Standard nor Posix require that `isascii' exist.
** For portability, we check both ancient and modern requirements.
@@ -26,6 +39,11 @@ static char elsieid[] = "@(#)zic.c 7.116";
#define isascii(x) 1
#endif
+#define OFFSET_STRLEN_MAXIMUM (7 + INT_STRLEN_MAXIMUM(long))
+#define RULE_STRLEN_MAXIMUM 8 /* "Mdd.dd.d" */
+
+#define end(cp) (strchr((cp), '\0'))
+
struct rule {
const char * r_filename;
int r_linenum;
@@ -34,6 +52,8 @@ struct rule {
int r_loyear; /* for example, 1986 */
int r_hiyear; /* for example, 1986 */
const char * r_yrtype;
+ int r_lowasnum;
+ int r_hiwasnum;
int r_month; /* 0..11 */
@@ -50,7 +70,7 @@ struct rule {
const char * r_abbrvar; /* variable part of abbreviation */
int r_todo; /* a rule to do (used in outzone) */
- time_t r_temp; /* used in outzone */
+ zic_t r_temp; /* used in outzone */
};
/*
@@ -76,7 +96,7 @@ struct zone {
int z_nrules;
struct rule z_untilrule;
- time_t z_untiltime;
+ zic_t z_untiltime;
};
extern int getopt P((int argc, char * const argv[],
@@ -85,17 +105,18 @@ extern int link P((const char * fromname, const char * toname));
extern char * optarg;
extern int optind;
-static void addtt P((time_t starttime, int type));
+static void addtt P((zic_t starttime, int type));
static int addtype P((long gmtoff, const char * abbr, int isdst,
int ttisstd, int ttisgmt));
-static void leapadd P((time_t t, int positive, int rolling, int count));
+static void leapadd P((zic_t t, int positive, int rolling, int count));
static void adjleap P((void));
static void associate P((void));
static int ciequal P((const char * ap, const char * bp));
static void convert P((long val, char * buf));
+static void convert64 P((zic_t val, char * buf));
static void dolink P((const char * fromfile, const char * tofile));
static void doabbr P((char * abbr, const char * format,
- const char * letters, int isdst));
+ const char * letters, int isdst, int doquotes));
static void eat P((const char * name, int num));
static void eats P((const char * name, int num,
const char * rname, int rnum));
@@ -111,6 +132,7 @@ static void inrule P((char ** fields, int nfields));
static int inzcont P((char ** fields, int nfields));
static int inzone P((char ** fields, int nfields));
static int inzsub P((char ** fields, int nfields, int iscont));
+static int is32 P((zic_t x));
static int itsabbr P((const char * abbr, const char * word));
static int itsdir P((const char * name));
static int lowerit P((int c));
@@ -120,33 +142,42 @@ static void newabbr P((const char * abbr));
static long oadd P((long t1, long t2));
static void outzone P((const struct zone * zp, int ntzones));
static void puttzcode P((long code, FILE * fp));
+static void puttzcode64 P((zic_t code, FILE * fp));
static int rcomp P((const void * leftp, const void * rightp));
-static time_t rpytime P((const struct rule * rp, int wantedy));
+static zic_t rpytime P((const struct rule * rp, int wantedy));
static void rulesub P((struct rule * rp,
const char * loyearp, const char * hiyearp,
const char * typep, const char * monthp,
const char * dayp, const char * timep));
+static int stringoffset P((char * result, long offset));
+static int stringrule P((char * result, const struct rule * rp,
+ long dstoff, long gmtoff));
+static void stringzone P((char * result,
+ const struct zone * zp, int ntzones));
static void setboundaries P((void));
-static time_t tadd P((time_t t1, long t2));
+static zic_t tadd P((zic_t t1, long t2));
static void usage P((void));
-static void writezone P((const char * name));
+static void writezone P((const char * name, const char * string));
static int yearistype P((int year, const char * type));
-#if !(HAVE_STRERROR - 0)
+#if !HAVE_STRERROR
static char * strerror P((int));
-#endif /* !(HAVE_STRERROR - 0) */
+#endif /* !HAVE_STRERROR */
static int charcnt;
static int errors;
static const char * filename;
static int leapcnt;
+static int leapseen;
+static int leapminyear;
+static int leapmaxyear;
static int linenum;
-static time_t max_time;
+static int max_abbrvar_len;
+static int max_format_len;
+static zic_t max_time;
static int max_year;
-static int max_year_representable;
-static time_t min_time;
+static zic_t min_time;
static int min_year;
-static int min_year_representable;
static int noise;
static const char * rfilename;
static int rlinenum;
@@ -334,7 +365,7 @@ static const int len_years[2] = {
};
static struct attype {
- time_t at;
+ zic_t at;
unsigned char type;
} attypes[TZ_MAX_TIMES];
static long gmtoffs[TZ_MAX_TYPES];
@@ -343,7 +374,7 @@ static unsigned char abbrinds[TZ_MAX_TYPES];
static char ttisstds[TZ_MAX_TYPES];
static char ttisgmts[TZ_MAX_TYPES];
static char chars[TZ_MAX_CHARS];
-static time_t trans[TZ_MAX_LEAPS];
+static zic_t trans[TZ_MAX_LEAPS];
static long corr[TZ_MAX_LEAPS];
static char roll[TZ_MAX_LEAPS];
@@ -360,7 +391,7 @@ char * const ptr;
(void) fprintf(stderr, _("%s: Memory exhausted: %s\n"),
progname, e);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
return ptr;
}
@@ -374,7 +405,7 @@ char * const ptr;
** Error handling.
*/
-#if !(HAVE_STRERROR - 0)
+#if !HAVE_STRERROR
static char *
strerror(errnum)
int errnum;
@@ -385,7 +416,7 @@ int errnum;
return (errnum > 0 && errnum <= sys_nerr) ?
sys_errlist[errnum] : _("Unknown system error");
}
-#endif /* !(HAVE_STRERROR - 0) */
+#endif /* !HAVE_STRERROR */
static void
eats(name, num, rname, rnum)
@@ -442,9 +473,11 @@ const char * const string;
static void
usage P((void))
{
- (void) fprintf(stderr, _("%s: usage is %s [ --version ] [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"),
+ (void) fprintf(stderr, _("%s: usage is %s \
+[ --version ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n\
+\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"),
progname, progname);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
static const char * psxrules;
@@ -452,7 +485,6 @@ static const char * lcltime;
static const char * directory;
static const char * leapsec;
static const char * yitcommand;
-static int sflag = FALSE;
int
main(argc, argv)
@@ -466,19 +498,23 @@ char * argv[];
#ifdef unix
(void) umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH));
#endif /* defined unix */
-#if HAVE_GETTEXT - 0
- (void) setlocale(LC_CTYPE, "");
- (void) setlocale(LC_MESSAGES, "");
+#if HAVE_GETTEXT
+ (void) setlocale(LC_ALL, "");
#ifdef TZ_DOMAINDIR
(void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);
#endif /* defined TEXTDOMAINDIR */
(void) textdomain(TZ_DOMAIN);
-#endif /* HAVE_GETTEXT - 0 */
+#endif /* HAVE_GETTEXT */
progname = argv[0];
+ if (TYPE_BIT(zic_t) < 64) {
+ (void) fprintf(stderr, "%s: %s\n", progname,
+ _("wild compilation-time specification of zic_t"));
+ exit(EXIT_FAILURE);
+ }
for (i = 1; i < argc; ++i)
if (strcmp(argv[i], "--version") == 0) {
(void) printf("%s\n", elsieid);
- (void) exit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
}
while ((c = getopt(argc, argv, "d:l:p:L:vsy:")) != EOF && c != -1)
switch (c) {
@@ -491,7 +527,7 @@ char * argv[];
(void) fprintf(stderr,
_("%s: More than one -d option specified\n"),
progname);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
break;
case 'l':
@@ -501,7 +537,7 @@ _("%s: More than one -d option specified\n"),
(void) fprintf(stderr,
_("%s: More than one -l option specified\n"),
progname);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
break;
case 'p':
@@ -511,7 +547,7 @@ _("%s: More than one -l option specified\n"),
(void) fprintf(stderr,
_("%s: More than one -p option specified\n"),
progname);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
break;
case 'y':
@@ -521,7 +557,7 @@ _("%s: More than one -p option specified\n"),
(void) fprintf(stderr,
_("%s: More than one -y option specified\n"),
progname);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
break;
case 'L':
@@ -531,14 +567,14 @@ _("%s: More than one -y option specified\n"),
(void) fprintf(stderr,
_("%s: More than one -L option specified\n"),
progname);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
break;
case 'v':
noise = TRUE;
break;
case 's':
- sflag = TRUE;
+ (void) printf("%s: -s ignored\n", progname);
break;
}
if (optind == argc - 1 && strcmp(argv[optind], "=") == 0)
@@ -558,7 +594,7 @@ _("%s: More than one -L option specified\n"),
for (i = optind; i < argc; ++i)
infile(argv[i]);
if (errors)
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
associate();
for (i = 0; i < nzones; i = j) {
/*
@@ -574,6 +610,11 @@ _("%s: More than one -L option specified\n"),
for (i = 0; i < nlinks; ++i) {
eat(links[i].l_filename, links[i].l_linenum);
dolink(links[i].l_from, links[i].l_to);
+ if (noise)
+ for (j = 0; j < nlinks; ++j)
+ if (strcmp(links[i].l_to,
+ links[j].l_from) == 0)
+ warning(_("link to link"));
}
if (lcltime != NULL) {
eat("command line", 1);
@@ -618,85 +659,54 @@ const char * const tofile;
int result;
if (mkdirs(toname) != 0)
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
result = link(fromname, toname);
-#if (HAVE_SYMLINK - 0)
+#if HAVE_SYMLINK
if (result != 0 &&
- access(fromname, F_OK) == 0 &&
- !itsdir(fromname)) {
- const char *s = tofile;
- register char * symlinkcontents = NULL;
- while ((s = strchr(s+1, '/')) != NULL)
- symlinkcontents = ecatalloc(symlinkcontents, "../");
- symlinkcontents = ecatalloc(symlinkcontents, fromname);
-
- result = unlink(toname);
- if (result != 0 && errno != ENOENT) {
- const char *e = strerror(errno);
-
- (void) fprintf(stderr,
- _("%s: Can't unlink %s: %s\n"),
- progname, toname, e);
- (void) exit(EXIT_FAILURE);
- }
-
- result = symlink(symlinkcontents, toname);
- if (result == 0)
+ access(fromname, F_OK) == 0 &&
+ !itsdir(fromname)) {
+ const char *s = tofile;
+ register char * symlinkcontents = NULL;
+
+ while ((s = strchr(s+1, '/')) != NULL)
+ symlinkcontents =
+ ecatalloc(symlinkcontents,
+ "../");
+ symlinkcontents =
+ ecatalloc(symlinkcontents,
+ fromname);
+ result = symlink(symlinkcontents,
+ toname);
+ if (result == 0)
warning(_("hard link failed, symbolic link used"));
- ifree(symlinkcontents);
+ ifree(symlinkcontents);
}
-#endif
+#endif /* HAVE_SYMLINK */
if (result != 0) {
const char *e = strerror(errno);
(void) fprintf(stderr,
_("%s: Can't link from %s to %s: %s\n"),
progname, fromname, toname, e);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
ifree(fromname);
ifree(toname);
}
-#ifndef INT_MAX
-#define INT_MAX ((int) (((unsigned)~0)>>1))
-#endif /* !defined INT_MAX */
-
-#ifndef INT_MIN
-#define INT_MIN ((int) ~(((unsigned)~0)>>1))
-#endif /* !defined INT_MIN */
-
-/*
-** The tz file format currently allows at most 32-bit quantities.
-** This restriction should be removed before signed 32-bit values
-** wrap around in 2038, but unfortunately this will require a
-** change to the tz file format.
-*/
-
-#define MAX_BITS_IN_FILE 32
-#define TIME_T_BITS_IN_FILE ((TYPE_BIT(time_t) < MAX_BITS_IN_FILE) ? TYPE_BIT(time_t) : MAX_BITS_IN_FILE)
+#define TIME_T_BITS_IN_FILE 64
static void
setboundaries P((void))
{
- if (TYPE_SIGNED(time_t)) {
- min_time = ~ (time_t) 0;
- min_time <<= TIME_T_BITS_IN_FILE - 1;
- max_time = ~ (time_t) 0 - min_time;
- if (sflag)
- min_time = 0;
- } else {
- min_time = 0;
- max_time = 2 - sflag;
- max_time <<= TIME_T_BITS_IN_FILE - 1;
- --max_time;
- }
- min_year = TM_YEAR_BASE + gmtime(&min_time)->tm_year;
- max_year = TM_YEAR_BASE + gmtime(&max_time)->tm_year;
- min_year_representable = min_year;
- max_year_representable = max_year;
+ register int i;
+
+ min_time = -1;
+ for (i = 0; i < TIME_T_BITS_IN_FILE - 1; ++i)
+ min_time *= 2;
+ max_time = -(min_time + 1);
}
static int
@@ -793,7 +803,7 @@ associate P((void))
*/
eat(zp->z_filename, zp->z_linenum);
zp->z_stdoff = gethms(zp->z_rule, _("unruly zone"),
- TRUE);
+ TRUE);
/*
** Note, though, that if there's no rule,
** a '%s' in the format is a bad thing.
@@ -803,7 +813,7 @@ associate P((void))
}
}
if (errors)
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
static void
@@ -827,7 +837,7 @@ const char * name;
(void) fprintf(stderr, _("%s: Can't open %s: %s\n"),
progname, name, e);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
wantcont = FALSE;
for (num = 1; ; ++num) {
@@ -837,7 +847,7 @@ const char * name;
cp = strchr(buf, '\n');
if (cp == NULL) {
error(_("line too long"));
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
*cp = '\0';
fields = getfields(buf);
@@ -881,7 +891,7 @@ _("%s: Leap line in non leap seconds file %s\n"),
(void) fprintf(stderr,
_("%s: panic: Invalid l_value %d\n"),
progname, lp->l_value);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
ifree((char *) fields);
@@ -889,14 +899,14 @@ _("%s: panic: Invalid l_value %d\n"),
if (ferror(fp)) {
(void) fprintf(stderr, _("%s: Error reading %s\n"),
progname, filename);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (fp != stdin && fclose(fp)) {
const char *e = strerror(errno);
(void) fprintf(stderr, _("%s: Error closing %s: %s\n"),
progname, filename, e);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (wantcont)
error(_("expected continuation line not found"));
@@ -971,6 +981,8 @@ const int nfields;
fields[RF_MONTH], fields[RF_DAY], fields[RF_TOD]);
r.r_name = ecpyalloc(fields[RF_NAME]);
r.r_abbrvar = ecpyalloc(fields[RF_ABBRVAR]);
+ if (max_abbrvar_len < strlen(r.r_abbrvar))
+ max_abbrvar_len = strlen(r.r_abbrvar);
rules = (struct rule *) (void *) erealloc((char *) rules,
(int) ((nrules + 1) * sizeof *rules));
rules[nrules++] = r;
@@ -1076,6 +1088,8 @@ const int iscont;
}
z.z_rule = ecpyalloc(fields[i_rule]);
z.z_format = ecpyalloc(fields[i_format]);
+ if (max_format_len < strlen(z.z_format))
+ max_format_len = strlen(z.z_format);
hasuntil = nfields > i_untilyear;
if (hasuntil) {
z.z_untilrule.r_filename = filename;
@@ -1096,7 +1110,9 @@ const int iscont;
zones[nzones - 1].z_untiltime > min_time &&
zones[nzones - 1].z_untiltime < max_time &&
zones[nzones - 1].z_untiltime >= z.z_untiltime) {
- error(_("Zone continuation line end time is not after end time of previous line"));
+ error(_(
+"Zone continuation line end time is not after end time of previous line"
+ ));
return FALSE;
}
}
@@ -1120,7 +1136,7 @@ const int nfields;
register int i, j;
int year, month, day;
long dayoff, tod;
- time_t t;
+ zic_t t;
if (nfields != LEAP_FIELDS) {
error(_("wrong number of fields on Leap line"));
@@ -1129,12 +1145,17 @@ const int nfields;
dayoff = 0;
cp = fields[LP_YEAR];
if (sscanf(cp, scheck(cp, "%d"), &year) != 1) {
- /*
- * Leapin' Lizards!
- */
- error(_("invalid leaping year"));
- return;
+ /*
+ ** Leapin' Lizards!
+ */
+ error(_("invalid leaping year"));
+ return;
}
+ if (!leapseen || leapmaxyear < year)
+ leapmaxyear = year;
+ if (!leapseen || leapminyear > year)
+ leapminyear = year;
+ leapseen = TRUE;
j = EPOCH_YEAR;
while (j != year) {
if (year > j) {
@@ -1164,7 +1185,7 @@ const int nfields;
return;
}
dayoff = oadd(dayoff, eitol(day - 1));
- if (dayoff < 0 && !TYPE_SIGNED(time_t)) {
+ if (dayoff < 0 && !TYPE_SIGNED(zic_t)) {
error(_("time before zero"));
return;
}
@@ -1176,7 +1197,7 @@ const int nfields;
error(_("time too large"));
return;
}
- t = (time_t) dayoff * SECSPERDAY;
+ t = (zic_t) dayoff * SECSPERDAY;
tod = gethms(fields[LP_TIME], _("invalid time of day"), FALSE);
cp = fields[LP_CORR];
{
@@ -1200,7 +1221,9 @@ const int nfields;
return;
}
if ((lp = byword(fields[LP_ROLL], leap_types)) == NULL) {
- error(_("illegal Rolling/Stationary field on Leap line"));
+ error(_(
+ "illegal Rolling/Stationary field on Leap line"
+ ));
return;
}
leapadd(tadd(t, tod), positive, lp->l_value, count);
@@ -1287,7 +1310,8 @@ const char * const timep;
*/
cp = loyearp;
lp = byword(cp, begin_years);
- if (lp != NULL) switch ((int) lp->l_value) {
+ rp->r_lowasnum = lp == NULL;
+ if (!rp->r_lowasnum) switch ((int) lp->l_value) {
case YR_MINIMUM:
rp->r_loyear = INT_MIN;
break;
@@ -1298,18 +1322,15 @@ const char * const timep;
(void) fprintf(stderr,
_("%s: panic: Invalid l_value %d\n"),
progname, lp->l_value);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} else if (sscanf(cp, scheck(cp, "%d"), &rp->r_loyear) != 1) {
error(_("invalid starting year"));
return;
- } else if (noise) {
- if (rp->r_loyear < min_year_representable)
- warning(_("starting year too low to be represented"));
- else if (rp->r_loyear > max_year_representable)
- warning(_("starting year too high to be represented"));
}
cp = hiyearp;
- if ((lp = byword(cp, end_years)) != NULL) switch ((int) lp->l_value) {
+ lp = byword(cp, end_years);
+ rp->r_hiwasnum = lp == NULL;
+ if (!rp->r_hiwasnum) switch ((int) lp->l_value) {
case YR_MINIMUM:
rp->r_hiyear = INT_MIN;
break;
@@ -1323,15 +1344,10 @@ const char * const timep;
(void) fprintf(stderr,
_("%s: panic: Invalid l_value %d\n"),
progname, lp->l_value);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
} else if (sscanf(cp, scheck(cp, "%d"), &rp->r_hiyear) != 1) {
error(_("invalid ending year"));
return;
- } else if (noise) {
- if (rp->r_loyear < min_year_representable)
- warning(_("ending year too low to be represented"));
- else if (rp->r_loyear > max_year_representable)
- warning(_("ending year too high to be represented"));
}
if (rp->r_loyear > rp->r_hiyear) {
error(_("starting year greater than ending year"));
@@ -1346,8 +1362,6 @@ const char * const timep;
}
rp->r_yrtype = ecpyalloc(typep);
}
- if (rp->r_loyear < min_year && rp->r_loyear > 0)
- min_year = rp->r_loyear;
/*
** Day work.
** Accept things such as:
@@ -1401,13 +1415,25 @@ const long val;
char * const buf;
{
register int i;
- register long shift;
+ register int shift;
for (i = 0, shift = 24; i < 4; ++i, shift -= 8)
buf[i] = val >> shift;
}
static void
+convert64(val, buf)
+const zic_t val;
+char * const buf;
+{
+ register int i;
+ register int shift;
+
+ for (i = 0, shift = 56; i < 8; ++i, shift -= 8)
+ buf[i] = val >> shift;
+}
+
+static void
puttzcode(val, fp)
const long val;
FILE * const fp;
@@ -1418,28 +1444,50 @@ FILE * const fp;
(void) fwrite((void *) buf, (size_t) sizeof buf, (size_t) 1, fp);
}
+static void
+puttzcode64(val, fp)
+const zic_t val;
+FILE * const fp;
+{
+ char buf[8];
+
+ convert64(val, buf);
+ (void) fwrite((void *) buf, (size_t) sizeof buf, (size_t) 1, fp);
+}
+
static int
atcomp(avp, bvp)
-void * avp;
-void * bvp;
+const void * avp;
+const void * bvp;
{
- if (((struct attype *) avp)->at < ((struct attype *) bvp)->at)
- return -1;
- else if (((struct attype *) avp)->at > ((struct attype *) bvp)->at)
- return 1;
- else return 0;
+ const zic_t a = ((const struct attype *) avp)->at;
+ const zic_t b = ((const struct attype *) bvp)->at;
+
+ return (a < b) ? -1 : (a > b);
+}
+
+static int
+is32(x)
+const zic_t x;
+{
+ return INT32_MIN <= x && x <= INT32_MAX;
}
static void
-writezone(name)
+writezone(name, string)
const char * const name;
+const char * const string;
{
- register FILE * fp;
- register int i, j;
- static char * fullname;
- static struct tzhead tzh;
- time_t ats[TZ_MAX_TIMES];
- unsigned char types[TZ_MAX_TIMES];
+ register FILE * fp;
+ register int i, j;
+ register int leapcnt32, leapi32;
+ register int timecnt32, timei32;
+ register int pass;
+ static char * fullname;
+ static const struct tzhead tzh0;
+ static struct tzhead tzh;
+ zic_t ats[TZ_MAX_TIMES];
+ unsigned char types[TZ_MAX_TIMES];
/*
** Sort.
@@ -1462,14 +1510,13 @@ const char * const name;
while (fromi < timecnt && attypes[fromi].type == 0)
++fromi; /* handled by default rule */
for ( ; fromi < timecnt; ++fromi) {
- if (toi != 0
- && ((attypes[fromi].at
- + gmtoffs[attypes[toi - 1].type])
- <= (attypes[toi - 1].at
- + gmtoffs[toi == 1 ? 0
- : attypes[toi - 2].type]))) {
- attypes[toi - 1].type = attypes[fromi].type;
- continue;
+ if (toi != 0 && ((attypes[fromi].at +
+ gmtoffs[attypes[toi - 1].type]) <=
+ (attypes[toi - 1].at + gmtoffs[toi == 1 ? 0
+ : attypes[toi - 2].type]))) {
+ attypes[toi - 1].type =
+ attypes[fromi].type;
+ continue;
}
if (toi == 0 ||
attypes[toi - 1].type != attypes[fromi].type)
@@ -1484,6 +1531,36 @@ const char * const name;
ats[i] = attypes[i].at;
types[i] = attypes[i].type;
}
+ /*
+ ** Correct for leap seconds.
+ */
+ for (i = 0; i < timecnt; ++i) {
+ j = leapcnt;
+ while (--j >= 0)
+ if (ats[i] > trans[j] - corr[j]) {
+ ats[i] = tadd(ats[i], corr[j]);
+ break;
+ }
+ }
+ /*
+ ** Figure out 32-bit-limited starts and counts.
+ */
+ timecnt32 = timecnt;
+ timei32 = 0;
+ leapcnt32 = leapcnt;
+ leapi32 = 0;
+ while (timecnt32 > 0 && !is32(ats[timecnt32 - 1]))
+ --timecnt32;
+ while (timecnt32 > 0 && !is32(ats[timei32])) {
+ --timecnt32;
+ ++timei32;
+ }
+ while (leapcnt32 > 0 && !is32(trans[leapcnt32 - 1]))
+ --leapcnt32;
+ while (leapcnt32 > 0 && !is32(trans[leapi32])) {
+ --leapcnt32;
+ ++leapi32;
+ }
fullname = erealloc(fullname,
(int) (strlen(directory) + 1 + strlen(name) + 1));
(void) sprintf(fullname, "%s/%s", directory, name);
@@ -1495,102 +1572,388 @@ const char * const name;
(void) fprintf(stderr, _("%s: Can't remove %s: %s\n"),
progname, fullname, e);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if ((fp = fopen(fullname, "wb")) == NULL) {
if (mkdirs(fullname) != 0)
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
if ((fp = fopen(fullname, "wb")) == NULL) {
const char *e = strerror(errno);
(void) fprintf(stderr, _("%s: Can't create %s: %s\n"),
progname, fullname, e);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
- convert(eitol(typecnt), tzh.tzh_ttisgmtcnt);
- convert(eitol(typecnt), tzh.tzh_ttisstdcnt);
- convert(eitol(leapcnt), tzh.tzh_leapcnt);
- convert(eitol(timecnt), tzh.tzh_timecnt);
- convert(eitol(typecnt), tzh.tzh_typecnt);
- convert(eitol(charcnt), tzh.tzh_charcnt);
- (void) strncpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic);
-#define DO(field) (void) fwrite((void *) tzh.field, (size_t) sizeof tzh.field, (size_t) 1, fp)
- DO(tzh_magic);
- DO(tzh_reserved);
- DO(tzh_ttisgmtcnt);
- DO(tzh_ttisstdcnt);
- DO(tzh_leapcnt);
- DO(tzh_timecnt);
- DO(tzh_typecnt);
- DO(tzh_charcnt);
-#undef DO
- for (i = 0; i < timecnt; ++i) {
- j = leapcnt;
- while (--j >= 0)
- if (ats[i] >= trans[j]) {
- ats[i] = tadd(ats[i], corr[j]);
- break;
+ for (pass = 1; pass <= 2; ++pass) {
+ register int thistimei, thistimecnt;
+ register int thisleapi, thisleapcnt;
+ register int thistimelim, thisleaplim;
+ int writetype[TZ_MAX_TIMES];
+ int typemap[TZ_MAX_TYPES];
+ register int thistypecnt;
+ char thischars[TZ_MAX_CHARS];
+ char thischarcnt;
+ int indmap[TZ_MAX_CHARS];
+
+ if (pass == 1) {
+ thistimei = timei32;
+ thistimecnt = timecnt32;
+ thisleapi = leapi32;
+ thisleapcnt = leapcnt32;
+ } else {
+ thistimei = 0;
+ thistimecnt = timecnt;
+ thisleapi = 0;
+ thisleapcnt = leapcnt;
+ }
+ thistimelim = thistimei + thistimecnt;
+ thisleaplim = thisleapi + thisleapcnt;
+ for (i = 0; i < typecnt; ++i)
+ writetype[i] = thistimecnt == timecnt;
+ if (thistimecnt == 0) {
+ /*
+ ** No transition times fall in the current
+ ** (32- or 64-bit) window.
+ */
+ if (typecnt != 0)
+ writetype[typecnt - 1] = TRUE;
+ } else {
+ for (i = thistimei - 1; i < thistimelim; ++i)
+ if (i >= 0)
+ writetype[types[i]] = TRUE;
+ /*
+ ** For America/Godthab and Antarctica/Palmer
+ */
+ if (thistimei == 0)
+ writetype[0] = TRUE;
+ }
+ thistypecnt = 0;
+ for (i = 0; i < typecnt; ++i)
+ typemap[i] = writetype[i] ? thistypecnt++ : -1;
+ for (i = 0; i < sizeof indmap / sizeof indmap[0]; ++i)
+ indmap[i] = -1;
+ thischarcnt = 0;
+ for (i = 0; i < typecnt; ++i) {
+ register char * thisabbr;
+
+ if (!writetype[i])
+ continue;
+ if (indmap[abbrinds[i]] >= 0)
+ continue;
+ thisabbr = &chars[abbrinds[i]];
+ for (j = 0; j < thischarcnt; ++j)
+ if (strcmp(&thischars[j], thisabbr) == 0)
+ break;
+ if (j == thischarcnt) {
+ (void) strcpy(&thischars[(int) thischarcnt],
+ thisabbr);
+ thischarcnt += strlen(thisabbr) + 1;
}
- puttzcode((long) ats[i], fp);
- }
- if (timecnt > 0)
- (void) fwrite((void *) types, (size_t) sizeof types[0],
- (size_t) timecnt, fp);
- for (i = 0; i < typecnt; ++i) {
- puttzcode((long) gmtoffs[i], fp);
- (void) putc(isdsts[i], fp);
- (void) putc(abbrinds[i], fp);
- }
- if (charcnt != 0)
- (void) fwrite((void *) chars, (size_t) sizeof chars[0],
- (size_t) charcnt, fp);
- for (i = 0; i < leapcnt; ++i) {
- if (roll[i]) {
- if (timecnt == 0 || trans[i] < ats[0]) {
- j = 0;
- while (isdsts[j])
- if (++j >= typecnt) {
- j = 0;
- break;
- }
- } else {
- j = 1;
- while (j < timecnt && trans[i] >= ats[j])
- ++j;
- j = types[j - 1];
+ indmap[abbrinds[i]] = j;
+ }
+#define DO(field) (void) fwrite((void *) tzh.field, \
+ (size_t) sizeof tzh.field, (size_t) 1, fp)
+ tzh = tzh0;
+ (void) strncpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic);
+ tzh.tzh_version[0] = ZIC_VERSION;
+ convert(eitol(thistypecnt), tzh.tzh_ttisgmtcnt);
+ convert(eitol(thistypecnt), tzh.tzh_ttisstdcnt);
+ convert(eitol(thisleapcnt), tzh.tzh_leapcnt);
+ convert(eitol(thistimecnt), tzh.tzh_timecnt);
+ convert(eitol(thistypecnt), tzh.tzh_typecnt);
+ convert(eitol(thischarcnt), tzh.tzh_charcnt);
+ DO(tzh_magic);
+ DO(tzh_version);
+ DO(tzh_reserved);
+ DO(tzh_ttisgmtcnt);
+ DO(tzh_ttisstdcnt);
+ DO(tzh_leapcnt);
+ DO(tzh_timecnt);
+ DO(tzh_typecnt);
+ DO(tzh_charcnt);
+#undef DO
+ for (i = thistimei; i < thistimelim; ++i)
+ if (pass == 1)
+ puttzcode((long) ats[i], fp);
+ else puttzcode64(ats[i], fp);
+ for (i = thistimei; i < thistimelim; ++i) {
+ unsigned char uc;
+
+ uc = typemap[types[i]];
+ (void) fwrite((void *) &uc,
+ (size_t) sizeof uc,
+ (size_t) 1,
+ fp);
+ }
+ for (i = 0; i < typecnt; ++i)
+ if (writetype[i]) {
+ puttzcode(gmtoffs[i], fp);
+ (void) putc(isdsts[i], fp);
+ (void) putc((unsigned char) indmap[abbrinds[i]], fp);
}
- puttzcode((long) tadd(trans[i], -gmtoffs[j]), fp);
- } else puttzcode((long) trans[i], fp);
- puttzcode((long) corr[i], fp);
- }
- for (i = 0; i < typecnt; ++i)
- (void) putc(ttisstds[i], fp);
- for (i = 0; i < typecnt; ++i)
- (void) putc(ttisgmts[i], fp);
+ if (thischarcnt != 0)
+ (void) fwrite((void *) thischars,
+ (size_t) sizeof thischars[0],
+ (size_t) thischarcnt, fp);
+ for (i = thisleapi; i < thisleaplim; ++i) {
+ register zic_t todo;
+
+ if (roll[i]) {
+ if (timecnt == 0 || trans[i] < ats[0]) {
+ j = 0;
+ while (isdsts[j])
+ if (++j >= typecnt) {
+ j = 0;
+ break;
+ }
+ } else {
+ j = 1;
+ while (j < timecnt &&
+ trans[i] >= ats[j])
+ ++j;
+ j = types[j - 1];
+ }
+ todo = tadd(trans[i], -gmtoffs[j]);
+ } else todo = trans[i];
+ if (pass == 1)
+ puttzcode((long) todo, fp);
+ else puttzcode64(todo, fp);
+ puttzcode(corr[i], fp);
+ }
+ for (i = 0; i < typecnt; ++i)
+ if (writetype[i])
+ (void) putc(ttisstds[i], fp);
+ for (i = 0; i < typecnt; ++i)
+ if (writetype[i])
+ (void) putc(ttisgmts[i], fp);
+ }
+ (void) fprintf(fp, "\n%s\n", string);
if (ferror(fp) || fclose(fp)) {
(void) fprintf(stderr, _("%s: Error writing %s\n"),
progname, fullname);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
static void
-doabbr(abbr, format, letters, isdst)
+doabbr(abbr, format, letters, isdst, doquotes)
char * const abbr;
const char * const format;
const char * const letters;
const int isdst;
+const int doquotes;
{
- if (strchr(format, '/') == NULL) {
+ register char * cp;
+ register char * slashp;
+ register int len;
+
+ slashp = strchr(format, '/');
+ if (slashp == NULL) {
if (letters == NULL)
(void) strcpy(abbr, format);
else (void) sprintf(abbr, format, letters);
- } else if (isdst)
- (void) strcpy(abbr, strchr(format, '/') + 1);
- else {
- (void) strcpy(abbr, format);
- *strchr(abbr, '/') = '\0';
+ } else if (isdst) {
+ (void) strcpy(abbr, slashp + 1);
+ } else {
+ if (slashp > format)
+ (void) strncpy(abbr, format,
+ (unsigned) (slashp - format));
+ abbr[slashp - format] = '\0';
+ }
+ if (!doquotes)
+ return;
+ for (cp = abbr; *cp != '\0'; ++cp)
+ if (strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZ", *cp) == NULL &&
+ strchr("abcdefghijklmnopqrstuvwxyz", *cp) == NULL)
+ break;
+ len = strlen(abbr);
+ if (len > 0 && *cp == '\0')
+ return;
+ abbr[len + 2] = '\0';
+ abbr[len + 1] = '>';
+ for ( ; len > 0; --len)
+ abbr[len] = abbr[len - 1];
+ abbr[0] = '<';
+}
+
+static void
+updateminmax(x)
+const int x;
+{
+ if (min_year > x)
+ min_year = x;
+ if (max_year < x)
+ max_year = x;
+}
+
+static int
+stringoffset(result, offset)
+char * result;
+long offset;
+{
+ register int hours;
+ register int minutes;
+ register int seconds;
+
+ result[0] = '\0';
+ if (offset < 0) {
+ (void) strcpy(result, "-");
+ offset = -offset;
+ }
+ seconds = offset % SECSPERMIN;
+ offset /= SECSPERMIN;
+ minutes = offset % MINSPERHOUR;
+ offset /= MINSPERHOUR;
+ hours = offset;
+ if (hours >= HOURSPERDAY) {
+ result[0] = '\0';
+ return -1;
+ }
+ (void) sprintf(end(result), "%d", hours);
+ if (minutes != 0 || seconds != 0) {
+ (void) sprintf(end(result), ":%02d", minutes);
+ if (seconds != 0)
+ (void) sprintf(end(result), ":%02d", seconds);
+ }
+ return 0;
+}
+
+static int
+stringrule(result, rp, dstoff, gmtoff)
+char * result;
+const struct rule * const rp;
+const long dstoff;
+const long gmtoff;
+{
+ register long tod;
+
+ result = end(result);
+ if (rp->r_dycode == DC_DOM) {
+ register int month, total;
+
+ if (rp->r_dayofmonth == 29 && rp->r_month == TM_FEBRUARY)
+ return -1;
+ total = 0;
+ for (month = 0; month < rp->r_month; ++month)
+ total += len_months[0][month];
+ (void) sprintf(result, "J%d", total + rp->r_dayofmonth);
+ } else {
+ register int week;
+
+ if (rp->r_dycode == DC_DOWGEQ) {
+ week = 1 + rp->r_dayofmonth / DAYSPERWEEK;
+ if ((week - 1) * DAYSPERWEEK + 1 != rp->r_dayofmonth)
+ return -1;
+ } else if (rp->r_dycode == DC_DOWLEQ) {
+ if (rp->r_dayofmonth == len_months[1][rp->r_month])
+ week = 5;
+ else {
+ week = 1 + rp->r_dayofmonth / DAYSPERWEEK;
+ if (week * DAYSPERWEEK - 1 != rp->r_dayofmonth)
+ return -1;
+ }
+ } else return -1; /* "cannot happen" */
+ (void) sprintf(result, "M%d.%d.%d",
+ rp->r_month + 1, week, rp->r_wday);
+ }
+ tod = rp->r_tod;
+ if (rp->r_todisgmt)
+ tod += gmtoff;
+ if (rp->r_todisstd && rp->r_stdoff == 0)
+ tod += dstoff;
+ if (tod < 0) {
+ result[0] = '\0';
+ return -1;
+ }
+ if (tod != 2 * SECSPERMIN * MINSPERHOUR) {
+ (void) strcat(result, "/");
+ if (stringoffset(end(result), tod) != 0)
+ return -1;
+ }
+ return 0;
+}
+
+static void
+stringzone(result, zpfirst, zonecount)
+char * result;
+const struct zone * const zpfirst;
+const int zonecount;
+{
+ register const struct zone * zp;
+ register struct rule * rp;
+ register struct rule * stdrp;
+ register struct rule * dstrp;
+ register int i;
+ register const char * abbrvar;
+
+ result[0] = '\0';
+ zp = zpfirst + zonecount - 1;
+ stdrp = dstrp = NULL;
+ for (i = 0; i < zp->z_nrules; ++i) {
+ rp = &zp->z_rules[i];
+ if (rp->r_hiwasnum || rp->r_hiyear != INT_MAX)
+ continue;
+ if (rp->r_yrtype != NULL)
+ continue;
+ if (rp->r_stdoff == 0) {
+ if (stdrp == NULL)
+ stdrp = rp;
+ else return;
+ } else {
+ if (dstrp == NULL)
+ dstrp = rp;
+ else return;
+ }
+ }
+ if (stdrp == NULL && dstrp == NULL) {
+ /*
+ ** There are no rules running through "max".
+ ** Let's find the latest rule.
+ */
+ for (i = 0; i < zp->z_nrules; ++i) {
+ rp = &zp->z_rules[i];
+ if (stdrp == NULL || rp->r_hiyear > stdrp->r_hiyear ||
+ (rp->r_hiyear == stdrp->r_hiyear &&
+ rp->r_month > stdrp->r_month))
+ stdrp = rp;
+ }
+ if (stdrp != NULL && stdrp->r_stdoff != 0)
+ return; /* We end up in DST (a POSIX no-no). */
+ /*
+ ** Horrid special case: if year is 2037,
+ ** presume this is a zone handled on a year-by-year basis;
+ ** do not try to apply a rule to the zone.
+ */
+ if (stdrp != NULL && stdrp->r_hiyear == 2037)
+ return;
+ }
+ if (stdrp == NULL && zp->z_nrules != 0)
+ return;
+ abbrvar = (stdrp == NULL) ? "" : stdrp->r_abbrvar;
+ doabbr(result, zp->z_format, abbrvar, FALSE, TRUE);
+ if (stringoffset(end(result), -zp->z_gmtoff) != 0) {
+ result[0] = '\0';
+ return;
+ }
+ if (dstrp == NULL)
+ return;
+ doabbr(end(result), zp->z_format, dstrp->r_abbrvar, TRUE, TRUE);
+ if (dstrp->r_stdoff != SECSPERMIN * MINSPERHOUR)
+ if (stringoffset(end(result),
+ -(zp->z_gmtoff + dstrp->r_stdoff)) != 0) {
+ result[0] = '\0';
+ return;
+ }
+ (void) strcat(result, ",");
+ if (stringrule(result, dstrp, dstrp->r_stdoff, zp->z_gmtoff) != 0) {
+ result[0] = '\0';
+ return;
+ }
+ (void) strcat(result, ",");
+ if (stringrule(result, stdrp, dstrp->r_stdoff, zp->z_gmtoff) != 0) {
+ result[0] = '\0';
+ return;
}
}
@@ -1603,7 +1966,7 @@ const int zonecount;
register struct rule * rp;
register int i, j;
register int usestart, useuntil;
- register time_t starttime, untiltime;
+ register zic_t starttime, untiltime;
register long gmtoff;
register long stdoff;
register int year;
@@ -1611,8 +1974,17 @@ const int zonecount;
register int startttisstd;
register int startttisgmt;
register int type;
- char startbuf[BUFSIZ];
-
+ register char * startbuf;
+ register char * ab;
+ register char * envvar;
+ register int max_abbr_len;
+ register int max_envvar_len;
+
+ max_abbr_len = 2 + max_format_len + max_abbrvar_len;
+ max_envvar_len = 2 * max_abbr_len + 5 * 9;
+ startbuf = emalloc(max_abbr_len + 1);
+ ab = emalloc(max_abbr_len + 1);
+ envvar = emalloc(max_envvar_len + 1);
INITIALIZE(untiltime);
INITIALIZE(starttime);
/*
@@ -1622,11 +1994,53 @@ const int zonecount;
typecnt = 0;
charcnt = 0;
/*
- ** Thanks to Earl Chew (earl@dnd.icp.nec.com.au)
+ ** Thanks to Earl Chew
** for noting the need to unconditionally initialize startttisstd.
*/
startttisstd = FALSE;
startttisgmt = FALSE;
+ min_year = max_year = EPOCH_YEAR;
+ if (leapseen) {
+ updateminmax(leapminyear);
+ updateminmax(leapmaxyear);
+ }
+ for (i = 0; i < zonecount; ++i) {
+ zp = &zpfirst[i];
+ updateminmax(zp->z_untilrule.r_loyear);
+ for (j = 0; j < zp->z_nrules; ++j) {
+ rp = &zp->z_rules[j];
+ if (rp->r_lowasnum)
+ updateminmax(rp->r_loyear);
+ if (rp->r_hiwasnum)
+ updateminmax(rp->r_hiyear);
+ }
+ }
+ /*
+ ** Generate lots of data if a rule can't cover all future times.
+ */
+ stringzone(envvar, zpfirst, zonecount);
+ if (noise && envvar[0] == '\0') {
+ register char * wp;
+
+wp = ecpyalloc(_("no POSIX environment variable for zone"));
+ wp = ecatalloc(wp, " ");
+ wp = ecatalloc(wp, zpfirst->z_name);
+ warning(wp);
+ ifree(wp);
+ }
+ if (envvar[0] == '\0') {
+ if (min_year >= INT_MIN + YEARSPERREPEAT)
+ min_year -= YEARSPERREPEAT;
+ else min_year = INT_MIN;
+ if (max_year <= INT_MAX - YEARSPERREPEAT)
+ max_year += YEARSPERREPEAT;
+ else max_year = INT_MAX;
+ }
+ /*
+ ** For the benefit of older systems, generate data through 2037.
+ */
+ if (max_year < 2037)
+ max_year = 2037;
for (i = 0; i < zonecount; ++i) {
/*
** A guess that may well be corrected later.
@@ -1644,7 +2058,7 @@ const int zonecount;
if (zp->z_nrules == 0) {
stdoff = zp->z_stdoff;
doabbr(startbuf, zp->z_format,
- (char *) NULL, stdoff != 0);
+ (char *) NULL, stdoff != 0, FALSE);
type = addtype(oadd(zp->z_gmtoff, stdoff),
startbuf, stdoff != 0, startttisstd,
startttisgmt);
@@ -1672,9 +2086,8 @@ const int zonecount;
}
for ( ; ; ) {
register int k;
- register time_t jtime, ktime;
+ register zic_t jtime, ktime;
register long offset;
- char buf[BUFSIZ];
INITIALIZE(ktime);
if (useuntil) {
@@ -1730,23 +2143,27 @@ const int zonecount;
stdoff);
doabbr(startbuf, zp->z_format,
rp->r_abbrvar,
- rp->r_stdoff != 0);
+ rp->r_stdoff != 0,
+ FALSE);
continue;
}
if (*startbuf == '\0' &&
- startoff == oadd(zp->z_gmtoff,
- stdoff)) {
- doabbr(startbuf, zp->z_format,
- rp->r_abbrvar,
- rp->r_stdoff != 0);
+ startoff == oadd(zp->z_gmtoff,
+ stdoff)) {
+ doabbr(startbuf,
+ zp->z_format,
+ rp->r_abbrvar,
+ rp->r_stdoff !=
+ 0,
+ FALSE);
}
}
eats(zp->z_filename, zp->z_linenum,
rp->r_filename, rp->r_linenum);
- doabbr(buf, zp->z_format, rp->r_abbrvar,
- rp->r_stdoff != 0);
+ doabbr(ab, zp->z_format, rp->r_abbrvar,
+ rp->r_stdoff != 0, FALSE);
offset = oadd(zp->z_gmtoff, rp->r_stdoff);
- type = addtype(offset, buf, rp->r_stdoff != 0,
+ type = addtype(offset, ab, rp->r_stdoff != 0,
rp->r_todisstd, rp->r_todisgmt);
addtt(ktime, type);
}
@@ -1779,12 +2196,15 @@ error(_("can't determine time zone abbreviation to use just after until time"));
starttime = tadd(starttime, -gmtoff);
}
}
- writezone(zpfirst->z_name);
+ writezone(zpfirst->z_name, envvar);
+ ifree(startbuf);
+ ifree(ab);
+ ifree(envvar);
}
static void
addtt(starttime, type)
-const time_t starttime;
+const zic_t starttime;
int type;
{
if (starttime <= min_time ||
@@ -1803,7 +2223,7 @@ int type;
}
if (timecnt >= TZ_MAX_TIMES) {
error(_("too many transitions?!"));
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
attypes[timecnt].at = starttime;
attypes[timecnt].type = type;
@@ -1822,15 +2242,15 @@ const int ttisgmt;
if (isdst != TRUE && isdst != FALSE) {
error(_("internal error - addtype called with bad isdst"));
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (ttisstd != TRUE && ttisstd != FALSE) {
error(_("internal error - addtype called with bad ttisstd"));
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
if (ttisgmt != TRUE && ttisgmt != FALSE) {
error(_("internal error - addtype called with bad ttisgmt"));
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
/*
** See if there's already an entry for this zone type.
@@ -1849,7 +2269,7 @@ const int ttisgmt;
*/
if (typecnt >= TZ_MAX_TYPES) {
error(_("too many local time types"));
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
gmtoffs[i] = gmtoff;
isdsts[i] = isdst;
@@ -1868,7 +2288,7 @@ const int ttisgmt;
static void
leapadd(t, positive, rolling, count)
-const time_t t;
+const zic_t t;
const int positive;
const int rolling;
int count;
@@ -1877,13 +2297,13 @@ int count;
if (leapcnt + (positive ? count : 1) > TZ_MAX_LEAPS) {
error(_("too many leap seconds"));
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
for (i = 0; i < leapcnt; ++i)
if (t <= trans[i]) {
if (t == trans[i]) {
error(_("repeated leap second moment"));
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
break;
}
@@ -1938,7 +2358,7 @@ const char * const type;
(void) fprintf(stderr, _("%s: command was '%s', result was %d\n"),
progname, buf, result);
for ( ; ; )
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
static int
@@ -2019,8 +2439,9 @@ register char * cp;
emalloc((int) ((strlen(cp) + 1) * sizeof *array));
nsubs = 0;
for ( ; ; ) {
- while (isascii(*cp) && isspace((unsigned char) *cp))
- ++cp;
+ while (isascii((unsigned char) *cp) &&
+ isspace((unsigned char) *cp))
+ ++cp;
if (*cp == '\0' || *cp == '#')
break;
array[nsubs++] = dp = cp;
@@ -2030,7 +2451,9 @@ register char * cp;
else while ((*dp = *cp++) != '"')
if (*dp != '\0')
++dp;
- else error(_("Odd number of quotation marks"));
+ else error(_(
+ "Odd number of quotation marks"
+ ));
} while (*cp != '\0' && *cp != '#' &&
(!isascii(*cp) || !isspace((unsigned char) *cp)));
if (isascii(*cp) && isspace((unsigned char) *cp))
@@ -2051,17 +2474,17 @@ const long t2;
t = t1 + t2;
if ((t2 > 0 && t <= t1) || (t2 < 0 && t >= t1)) {
error(_("time overflow"));
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
return t;
}
-static time_t
+static zic_t
tadd(t1, t2)
-const time_t t1;
+const zic_t t1;
const long t2;
{
- register time_t t;
+ register zic_t t;
if (t1 == max_time && t2 > 0)
return max_time;
@@ -2070,7 +2493,7 @@ const long t2;
t = t1 + t2;
if ((t2 > 0 && t <= t1) || (t2 < 0 && t >= t1)) {
error(_("time overflow"));
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
return t;
}
@@ -2080,14 +2503,14 @@ const long t2;
** 1970, 00:00 LOCAL time - in that year that the rule refers to.
*/
-static time_t
+static zic_t
rpytime(rp, wantedy)
register const struct rule * const rp;
register const int wantedy;
{
register int y, m, i;
register long dayoff; /* with a nod to Margaret O. */
- register time_t t;
+ register zic_t t;
if (wantedy == INT_MIN)
return min_time;
@@ -2117,7 +2540,7 @@ register const int wantedy;
--i;
else {
error(_("use of 2/29 in non leap-year"));
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
}
--i;
@@ -2151,18 +2574,15 @@ register const int wantedy;
}
if (i < 0 || i >= len_months[isleap(y)][m]) {
if (noise)
- warning(_("rule goes past start/end of month--will not work with pre-2004 versions of zic"));
+ warning(_("rule goes past start/end of month--\
+will not work with pre-2004 versions of zic"));
}
}
- if (dayoff < 0 && !TYPE_SIGNED(time_t))
- return min_time;
if (dayoff < min_time / SECSPERDAY)
return min_time;
if (dayoff > max_time / SECSPERDAY)
return max_time;
- t = (time_t) dayoff * SECSPERDAY;
- if (t > 0 && max_time - t < rp->r_tod)
- return max_time;
+ t = (zic_t) dayoff * SECSPERDAY;
return tadd(t, rp->r_tod);
}
@@ -2172,10 +2592,48 @@ const char * const string;
{
register int i;
+ if (strcmp(string, GRANDPARENTED) != 0) {
+ register const char * cp;
+ register char * wp;
+
+ /*
+ ** Want one to ZIC_MAX_ABBR_LEN_WO_WARN alphabetics
+ ** optionally followed by a + or - and a number from 1 to 14.
+ */
+ cp = string;
+ wp = NULL;
+ while (isascii((unsigned char) *cp) &&
+ isalpha((unsigned char) *cp))
+ ++cp;
+ if (cp - string == 0)
+wp = _("time zone abbreviation lacks alphabetic at start");
+ if (noise && cp - string > 3)
+wp = _("time zone abbreviation has more than 3 alphabetics");
+ if (cp - string > ZIC_MAX_ABBR_LEN_WO_WARN)
+wp = _("time zone abbreviation has too many alphabetics");
+ if (wp == NULL && (*cp == '+' || *cp == '-')) {
+ ++cp;
+ if (isascii((unsigned char) *cp) &&
+ isdigit((unsigned char) *cp))
+ if (*cp++ == '1' &&
+ *cp >= '0' && *cp <= '4')
+ ++cp;
+ }
+ if (*cp != '\0')
+wp = _("time zone abbreviation differs from POSIX standard");
+ if (wp != NULL) {
+ wp = ecpyalloc(wp);
+ wp = ecatalloc(wp, " (");
+ wp = ecatalloc(wp, string);
+ wp = ecatalloc(wp, ")");
+ warning(wp);
+ ifree(wp);
+ }
+ }
i = strlen(string) + 1;
if (charcnt + i > TZ_MAX_CHARS) {
error(_("too many, or too long, time zone abbreviations"));
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
(void) strcpy(&chars[charcnt], string);
charcnt += eitol(i);
@@ -2239,7 +2697,7 @@ const int i;
(void) fprintf(stderr,
_("%s: %d did not sign extend correctly\n"),
progname, i);
- (void) exit(EXIT_FAILURE);
+ exit(EXIT_FAILURE);
}
return l;
}
diff --git a/timezone/zone.tab b/timezone/zone.tab
index e3c8e39..09cdf69 100644
--- a/timezone/zone.tab
+++ b/timezone/zone.tab
@@ -1,8 +1,8 @@
-# @(#)zone.tab 1.30
+# @(#)zone.tab 8.1
#
# TZ zone descriptions
#
-# From Paul Eggert <eggert@twinsun.com> (1996-08-05):
+# From Paul Eggert (1996-08-05):
#
# This file contains a table with the following columns:
# 1. ISO 3166 2-character country code. See the file `iso3166.tab'.
@@ -45,17 +45,17 @@ AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF)
AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, LP, MN, NQ, RN, SA, SE, SF, SL)
AR -2411-06518 America/Argentina/Jujuy Jujuy (JY)
AR -3124-06411 America/Argentina/Tucuman Tucuman (TM)
-AR -2828-06547 America/Argentina/Catamarca Catamarca (CT)
+AR -2828-06547 America/Argentina/Catamarca Catamarca (CT), Chubut (CH)
AR -2926-06651 America/Argentina/La_Rioja La Rioja (LR)
AR -3132-06831 America/Argentina/San_Juan San Juan (SJ)
AR -3253-06849 America/Argentina/Mendoza Mendoza (MZ)
-AR -4552-06730 America/Argentina/ComodRivadavia Chubut (CH)
AR -5138-06913 America/Argentina/Rio_Gallegos Santa Cruz (SC)
AR -5448-06818 America/Argentina/Ushuaia Tierra del Fuego (TF)
AS -1416-17042 Pacific/Pago_Pago
AT +4813+01620 Europe/Vienna
AU -3133+15905 Australia/Lord_Howe Lord Howe Island
-AU -4253+14719 Australia/Hobart Tasmania
+AU -4253+14719 Australia/Hobart Tasmania - most locations
+AU -3956+14352 Australia/Currie Tasmania - King Island
AU -3749+14458 Australia/Melbourne Victoria
AU -3352+15113 Australia/Sydney New South Wales - most locations
AU -3157+14127 Australia/Broken_Hill New South Wales - Yancowinna
@@ -100,16 +100,18 @@ BW -2545+02555 Africa/Gaborone
BY +5354+02734 Europe/Minsk
BZ +1730-08812 America/Belize
CA +4734-05243 America/St_Johns Newfoundland Island
-CA +4439-06336 America/Halifax Atlantic Time - Nova Scotia (most places), NB, W Labrador, E Quebec & PEI
+CA +4439-06336 America/Halifax Atlantic Time - Nova Scotia (most places), W Labrador, E Quebec & PEI
CA +4612-05957 America/Glace_Bay Atlantic Time - Nova Scotia - places that did not observe DST 1966-1971
+CA +4606-06447 America/Moncton Atlantic Time - New Brunswick
CA +5320-06025 America/Goose_Bay Atlantic Time - E Labrador
CA +4531-07334 America/Montreal Eastern Time - Quebec - most locations
CA +4339-07923 America/Toronto Eastern Time - Ontario - most locations
CA +4901-08816 America/Nipigon Eastern Time - Ontario & Quebec - places that did not observe DST 1967-1973
CA +4823-08915 America/Thunder_Bay Eastern Time - Thunder Bay, Ontario
-CA +6608-06544 America/Pangnirtung Eastern Standard Time - Pangnirtung, Nunavut
-CA +6344-06828 America/Iqaluit Eastern Standard Time - east Nunavut
-CA +6245-09210 America/Rankin_Inlet Eastern Standard Time - central Nunavut
+CA +6608-06544 America/Pangnirtung Eastern Time - Pangnirtung, Nunavut
+CA +6344-06828 America/Iqaluit Eastern Time - east Nunavut
+CA +6408-08310 America/Coral_Harbour Eastern Standard Time - Southampton Island
+CA +6245-09210 America/Rankin_Inlet Central Time - central Nunavut
CA +4953-09709 America/Winnipeg Central Time - Manitoba & west Ontario
CA +4843-09429 America/Rainy_River Central Time - Rainy River & Fort Frances, Ontario
CA +6903-10505 America/Cambridge_Bay Central Time - west Nunavut
@@ -165,15 +167,13 @@ ET +0902+03842 Africa/Addis_Ababa
FI +6010+02458 Europe/Helsinki
FJ -1808+17825 Pacific/Fiji
FK -5142-05751 Atlantic/Stanley
-FM +0931+13808 Pacific/Yap Yap
-FM +0725+15147 Pacific/Truk Truk (Chuuk)
+FM +0725+15147 Pacific/Truk Truk (Chuuk) and Yap
FM +0658+15813 Pacific/Ponape Ponape (Pohnpei)
FM +0519+16259 Pacific/Kosrae Kosrae
FO +6201-00646 Atlantic/Faeroe
FR +4852+00220 Europe/Paris
GA +0023+00927 Africa/Libreville
-GB +512830-0001845 Europe/London Great Britain
-GB +5435-00555 Europe/Belfast Northern Ireland
+GB +512830-0001845 Europe/London
GD +1203-06145 America/Grenada
GE +4143+04449 Asia/Tbilisi
GF +0456-05220 America/Cayenne
@@ -248,8 +248,7 @@ MG -1855+04731 Indian/Antananarivo
MH +0709+17112 Pacific/Majuro most locations
MH +0905+16720 Pacific/Kwajalein Kwajalein
MK +4159+02126 Europe/Skopje
-ML +1239-00800 Africa/Bamako southwest Mali
-ML +1446-00301 Africa/Timbuktu northeast Mali
+ML +1239-00800 Africa/Bamako
MM +1647+09610 Asia/Rangoon
MN +4755+10653 Asia/Ulaanbaatar most locations
MN +4801+09139 Asia/Hovd Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan
@@ -370,14 +369,16 @@ UM +2813-17722 Pacific/Midway Midway Islands
UM +1917+16637 Pacific/Wake Wake Island
US +404251-0740023 America/New_York Eastern Time
US +421953-0830245 America/Detroit Eastern Time - Michigan - most locations
-US +381515-0854534 America/Louisville Eastern Time - Kentucky - Louisville area
+US +381515-0854534 America/Kentucky/Louisville Eastern Time - Kentucky - Louisville area
US +364947-0845057 America/Kentucky/Monticello Eastern Time - Kentucky - Wayne County
-US +394606-0860929 America/Indianapolis Eastern Standard Time - Indiana - most locations
-US +382232-0862041 America/Indiana/Marengo Eastern Standard Time - Indiana - Crawford County
-US +411745-0863730 America/Indiana/Knox Eastern Standard Time - Indiana - Starke County
-US +384452-0850402 America/Indiana/Vevay Eastern Standard Time - Indiana - Switzerland County
+US +394606-0860929 America/Indiana/Indianapolis Eastern Time - Indiana - most locations
+US +382232-0862041 America/Indiana/Marengo Eastern Time - Indiana - Crawford County
+US +411745-0863730 America/Indiana/Knox Eastern Time - Indiana - Starke County
+US +384452-0850402 America/Indiana/Vevay Eastern Time - Indiana - Switzerland County
US +415100-0873900 America/Chicago Central Time
-US +450628-0873651 America/Menominee Central Time - Michigan - Wisconsin border
+US +384038-0873143 America/Indiana/Vincennes Central Time - Indiana - Daviess, Dubois, Knox, Martin, Perry & Pulaski
+US +382931-0871643 America/Indiana/Petersburg Central Time - Indiana - Pike County
+US +450628-0873651 America/Menominee Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties
US +470659-1011757 America/North_Dakota/Center Central Time - North Dakota - Oliver County
US +394421-1045903 America/Denver Mountain Time
US +433649-1161209 America/Boise Mountain Time - south Idaho & east Oregon