+# Directive 2000/84/EC of the European Parliament and of the Council
+# of 19 January 2001 on summer-time arrangements.
+#
+
+# W-Eur differs from EU only in that W-Eur uses standard time.
+Rule W-Eur 1977 1980 - Apr Sun>=1 1:00s 1:00 S
+Rule W-Eur 1977 only - Sep lastSun 1:00s 0 -
+Rule W-Eur 1978 only - Oct 1 1:00s 0 -
+Rule W-Eur 1979 1995 - Sep lastSun 1:00s 0 -
+Rule W-Eur 1981 max - Mar lastSun 1:00s 1:00 S
+Rule W-Eur 1996 max - Oct lastSun 1:00s 0 -
+
+# Older C-Eur rules are for convenience in the tables.
+# From 1977 on, C-Eur differs from EU only in that C-Eur uses standard time.
+Rule C-Eur 1916 only - Apr 30 23:00 1:00 S
+Rule C-Eur 1916 only - Oct 1 1:00 0 -
+Rule C-Eur 1917 1918 - Apr Mon>=15 2:00s 1:00 S
+Rule C-Eur 1917 1918 - Sep Mon>=15 2:00s 0 -
+Rule C-Eur 1940 only - Apr 1 2:00s 1:00 S
+Rule C-Eur 1942 only - Nov 2 2:00s 0 -
+Rule C-Eur 1943 only - Mar 29 2:00s 1:00 S
+Rule C-Eur 1943 only - Oct 4 2:00s 0 -
+Rule C-Eur 1944 only - Apr 3 2:00s 1:00 S
+# Whitman gives 1944 Oct 7; go with Shanks.
+Rule C-Eur 1944 only - Oct 2 2:00s 0 -
+Rule C-Eur 1977 1980 - Apr Sun>=1 2:00s 1:00 S
+Rule C-Eur 1977 only - Sep lastSun 2:00s 0 -
+Rule C-Eur 1978 only - Oct 1 2:00s 0 -
+Rule C-Eur 1979 1995 - Sep lastSun 2:00s 0 -
+Rule C-Eur 1981 max - Mar lastSun 2:00s 1:00 S
+Rule C-Eur 1996 max - Oct lastSun 2:00s 0 -
+
+# E-Eur differs from EU only in that E-Eur switches at midnight local time.
+Rule E-Eur 1977 1980 - Apr Sun>=1 0:00 1:00 S
+Rule E-Eur 1977 only - Sep lastSun 0:00 0 -
+Rule E-Eur 1978 only - Oct 1 0:00 0 -
+Rule E-Eur 1979 1995 - Sep lastSun 0:00 0 -
+Rule E-Eur 1981 max - Mar lastSun 0:00 1:00 S
+Rule E-Eur 1996 max - Oct lastSun 0:00 0 -
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Russia 1917 only - Jul 1 23:00 1:00 MST # Moscow Summer Time
+Rule Russia 1917 only - Dec 28 0:00 0 MMT # Moscow Mean Time
+Rule Russia 1918 only - May 31 22:00 2:00 MDST # Moscow Double Summer Time
+Rule Russia 1918 only - Sep 16 1:00 1:00 MST
+Rule Russia 1919 only - May 31 23:00 2:00 MDST
+Rule Russia 1919 only - Jul 1 2:00 1:00 S
+Rule Russia 1919 only - Aug 16 0:00 0 -
+Rule Russia 1921 only - Feb 14 23:00 1:00 S
+Rule Russia 1921 only - Mar 20 23:00 2:00 M # Midsummer
+Rule Russia 1921 only - Sep 1 0:00 1:00 S
+Rule Russia 1921 only - Oct 1 0:00 0 -
+# Act No.925 of the Council of Ministers of the USSR (1980-10-24):
+Rule Russia 1981 1984 - Apr 1 0:00 1:00 S
+Rule Russia 1981 1983 - Oct 1 0:00 0 -
+# Act No.967 of the Council of Ministers of the USSR (1984-09-13), repeated in
+# Act No.227 of the Council of Ministers of the USSR (1989-03-14):
+Rule Russia 1984 1991 - Sep lastSun 2:00s 0 -
+Rule Russia 1985 1991 - Mar lastSun 2:00s 1:00 S
+#
+Rule Russia 1992 only - Mar lastSat 23:00 1:00 S
+Rule Russia 1992 only - Sep lastSat 23:00 0 -
+Rule Russia 1993 max - Mar lastSun 2:00s 1:00 S
+Rule Russia 1993 1995 - Sep lastSun 2:00s 0 -
+Rule Russia 1996 max - Oct lastSun 2:00s 0 -
+
+# These are for backward compatibility with older versions.
+
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone WET 0:00 EU WE%sT
+Zone CET 1:00 C-Eur CE%sT
+Zone MET 1:00 C-Eur ME%sT
+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 (1996-07-12):
+# The official German names ... are
+#
+# Mitteleuropaeische Zeit (MEZ) = UTC+01:00
+# Mitteleuropaeische Sommerzeit (MESZ) = UTC+02:00
+#
+# as defined in the German Time Act (Gesetz ueber die Zeitbestimmung (ZeitG),
+# 1978-07-25, Bundesgesetzblatt, Jahrgang 1978, Teil I, S. 1110-1111)....
+# I wrote ... to the German Federal Physical-Technical Institution
+#
+# Physikalisch-Technische Bundesanstalt (PTB)
+# Laboratorium 4.41 "Zeiteinheit"
+# Postfach 3345
+# D-38023 Braunschweig
+# phone: +49 531 592-0
+#
+# ... I received today an answer letter from Dr. Peter Hetzel, head of the PTB
+# department for time and frequency transmission. He explained that the
+# PTB translates MEZ and MESZ into English as
+#
+# Central European Time (CET) = UTC+01:00
+# Central European Summer Time (CEST) = UTC+02:00
+
+
+# Albania
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Albania 1940 only - Jun 16 0:00 1:00 S
+Rule Albania 1942 only - Nov 2 3:00 0 -
+Rule Albania 1943 only - Mar 29 2:00 1:00 S
+Rule Albania 1943 only - Apr 10 3:00 0 -
+Rule Albania 1974 only - May 4 0:00 1:00 S
+Rule Albania 1974 only - Oct 2 0:00 0 -
+Rule Albania 1975 only - May 1 0:00 1:00 S
+Rule Albania 1975 only - Oct 2 0:00 0 -
+Rule Albania 1976 only - May 2 0:00 1:00 S
+Rule Albania 1976 only - Oct 3 0:00 0 -
+Rule Albania 1977 only - May 8 0:00 1:00 S
+Rule Albania 1977 only - Oct 2 0:00 0 -
+Rule Albania 1978 only - May 6 0:00 1:00 S
+Rule Albania 1978 only - Oct 1 0:00 0 -
+Rule Albania 1979 only - May 5 0:00 1:00 S
+Rule Albania 1979 only - Sep 30 0:00 0 -
+Rule Albania 1980 only - May 3 0:00 1:00 S
+Rule Albania 1980 only - Oct 4 0:00 0 -
+Rule Albania 1981 only - Apr 26 0:00 1:00 S
+Rule Albania 1981 only - Sep 27 0:00 0 -
+Rule Albania 1982 only - May 2 0:00 1:00 S
+Rule Albania 1982 only - Oct 3 0:00 0 -
+Rule Albania 1983 only - Apr 18 0:00 1:00 S
+Rule Albania 1983 only - Oct 1 0:00 0 -
+Rule Albania 1984 only - Apr 1 0:00 1:00 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone Europe/Tirane 1:19:20 - LMT 1914
+ 1:00 - CET 1940 Jun 16
+ 1:00 Albania CE%sT 1984 Jul
+ 1:00 EU CE%sT
+
+# Andorra
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone Europe/Andorra 0:06:04 - LMT 1901
+ 0:00 - WET 1946 Sep 30
+ 1:00 - CET 1985 Mar 31 2:00
+ 1:00 EU CE%sT
+
+# Austria
+
+# From Paul Eggert (2003-02-28): Shanks gives 1918-06-16 and
+# 1945-11-18, but the Austrian Federal Office of Metrology and
+# Surveying (BEV) gives 1918-09-16 and for Vienna gives the "alleged"
+# date of 1945-04-12 with no time. For the 1980-04-06 transition
+# Shanks gives 02:00, the BEV 00:00. Go with the BEV, and guess 02:00
+# for 1945-04-12.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Austria 1920 only - Apr 5 2:00s 1:00 S
+Rule Austria 1920 only - Sep 13 2:00s 0 -
+Rule Austria 1946 only - Apr 14 2:00s 1:00 S
+Rule Austria 1946 1948 - Oct Sun>=1 2:00s 0 -
+Rule Austria 1947 only - Apr 6 2:00s 1:00 S
+Rule Austria 1948 only - Apr 18 2:00s 1:00 S
+Rule Austria 1980 only - Apr 6 0:00 1:00 S
+Rule Austria 1980 only - Sep 28 0:00 0 -
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone Europe/Vienna 1:05:20 - LMT 1893 Apr
+ 1:00 C-Eur CE%sT 1920
+ 1:00 Austria CE%sT 1940 Apr 1 2:00s
+ 1:00 C-Eur CE%sT 1945 Apr 2 2:00s
+ 1:00 1:00 CEST 1945 Apr 12 2:00s
+ 1:00 - CET 1946
+ 1:00 Austria CE%sT 1981
+ 1:00 EU CE%sT
+
+# Belarus
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone Europe/Minsk 1:50:16 - LMT 1880
+ 1:50 - MMT 1924 May 2 # Minsk Mean Time
+ 2:00 - EET 1930 Jun 21
+ 3:00 - MSK 1941 Jun 28
+ 1:00 C-Eur CE%sT 1944 Jul 3
+ 3:00 Russia MSK/MSD 1990
+ 3:00 - MSK 1991 Mar 31 2:00s
+ 2:00 1:00 EEST 1991 Sep 29 2:00s
+ 2:00 - EET 1992 Mar 29 0:00s
+ 2:00 1:00 EEST 1992 Sep 27 0:00s
+ 2:00 Russia EE%sT
+
+# Belgium
+#
+# From Paul Eggert (1997-07-02):
+# Entries from 1918 through 1991 are taken from:
+# Annuaire de L'Observatoire Royal de Belgique,
+# Avenue Circulaire, 3, B-1180 BRUXELLES, CLVIIe annee, 1991
+# (Imprimerie HAYEZ, s.p.r.l., Rue Fin, 4, 1080 BRUXELLES, MCMXC),
+# 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
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.
+#
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Belgium 1918 only - Mar 9 0:00s 1:00 S
+Rule Belgium 1918 1919 - Oct Sat>=1 23:00s 0 -
+Rule Belgium 1919 only - Mar 1 23:00s 1:00 S
+Rule Belgium 1920 only - Feb 14 23:00s 1:00 S
+Rule Belgium 1920 only - Oct 23 23:00s 0 -
+Rule Belgium 1921 only - Mar 14 23:00s 1:00 S
+Rule Belgium 1921 only - Oct 25 23:00s 0 -
+Rule Belgium 1922 only - Mar 25 23:00s 1:00 S
+Rule Belgium 1922 1927 - Oct Sat>=1 23:00s 0 -
+Rule Belgium 1923 only - Apr 21 23:00s 1:00 S
+Rule Belgium 1924 only - Mar 29 23:00s 1:00 S
+Rule Belgium 1925 only - Apr 4 23:00s 1:00 S
+# DSH writes that a royal decree of 1926-02-22 specified the Sun following 3rd
+# Sat in Apr (except if it's Easter, in which case it's one Sunday earlier),
+# to Sun following 1st Sat in Oct, and that a royal decree of 1928-09-15
+# changed the transition times to 02:00 GMT.
+Rule Belgium 1926 only - Apr 17 23:00s 1:00 S
+Rule Belgium 1927 only - Apr 9 23:00s 1:00 S
+Rule Belgium 1928 only - Apr 14 23:00s 1:00 S
+Rule Belgium 1928 1938 - Oct Sun>=2 2:00s 0 -
+Rule Belgium 1929 only - Apr 21 2:00s 1:00 S
+Rule Belgium 1930 only - Apr 13 2:00s 1:00 S
+Rule Belgium 1931 only - Apr 19 2:00s 1:00 S
+Rule Belgium 1932 only - Apr 3 2:00s 1:00 S
+Rule Belgium 1933 only - Mar 26 2:00s 1:00 S
+Rule Belgium 1934 only - Apr 8 2:00s 1:00 S
+Rule Belgium 1935 only - Mar 31 2:00s 1:00 S
+Rule Belgium 1936 only - Apr 19 2:00s 1:00 S
+Rule Belgium 1937 only - Apr 4 2:00s 1:00 S
+Rule Belgium 1938 only - Mar 27 2:00s 1:00 S
+Rule Belgium 1939 only - Apr 16 2:00s 1:00 S
+Rule Belgium 1939 only - Nov 19 2:00s 0 -
+Rule Belgium 1940 only - Feb 25 2:00s 1:00 S
+Rule Belgium 1944 only - Sep 17 2:00s 0 -
+Rule Belgium 1945 only - Apr 2 2:00s 1:00 S
+Rule Belgium 1945 only - Sep 16 2:00s 0 -
+Rule Belgium 1946 only - May 19 2:00s 1:00 S
+Rule Belgium 1946 only - Oct 7 2:00s 0 -
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone Europe/Brussels 0:17:30 - LMT 1880
+ 0:17:30 - BMT 1892 May 1 12:00 # Brussels MT
+ 0:00 - WET 1914 Nov 8
+ 1:00 - CET 1916 May 1 0:00
+ 1:00 C-Eur CE%sT 1918 Nov 11 11:00u
+ 0:00 Belgium WE%sT 1940 May 20 2:00s
+ 1:00 C-Eur CE%sT 1944 Sep 3
+ 1:00 Belgium CE%sT 1977
+ 1:00 EU CE%sT
+
+# Bosnia and Herzegovina
+# see Serbia and Montenegro
+
+# Bulgaria
+#
+# 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
+#
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Bulg 1979 only - Mar 31 23:00 1:00 S
+Rule Bulg 1979 only - Oct 1 1:00 0 -
+Rule Bulg 1980 1982 - Apr Sat<=7 23:00 1:00 S
+Rule Bulg 1980 only - Sep 29 1:00 0 -
+Rule Bulg 1981 only - Sep 27 2:00 0 -
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone Europe/Sofia 1:33:16 - LMT 1880
+ 1:56:56 - IMT 1894 Nov 30 # Istanbul MT?
+ 2:00 - EET 1942 Nov 2 3:00
+ 1:00 C-Eur CE%sT 1945 Apr 2 3:00
+ 2:00 - EET 1979 Mar 31 23:00
+ 2:00 Bulg EE%sT 1982 Sep 26 2:00
+ 2:00 C-Eur EE%sT 1991
+ 2:00 E-Eur EE%sT 1997
+ 2:00 EU EE%sT
+
+# Croatia
+# see Serbia and Montenegro
+
+# Czech Republic
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Czech 1945 only - Apr 8 2:00s 1:00 S
+Rule Czech 1945 only - Nov 18 2:00s 0 -
+Rule Czech 1946 only - May 6 2:00s 1:00 S
+Rule Czech 1946 1949 - Oct Sun>=1 2:00s 0 -
+Rule Czech 1947 only - Apr 20 2:00s 1:00 S
+Rule Czech 1948 only - Apr 18 2:00s 1:00 S
+Rule Czech 1949 only - Apr 9 2:00s 1:00 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone Europe/Prague 0:57:44 - LMT 1850
+ 0:57:44 - PMT 1891 Oct # Prague Mean Time
+ 1:00 C-Eur CE%sT 1944 Sep 17 2:00s
+ 1:00 Czech CE%sT 1979
+ 1:00 EU CE%sT
+
+# Denmark, Faeroe Islands, and Greenland
+# 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 -
+Rule Denmark 1940 only - May 15 0:00 1:00 S
+Rule Denmark 1945 only - Apr 2 2:00s 1:00 S
+Rule Denmark 1945 only - Aug 15 2:00s 0 -
+Rule Denmark 1946 only - May 1 2:00s 1:00 S
+Rule Denmark 1946 only - Sep 1 2:00s 0 -
+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
+ 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
+ 1:00 EU CE%sT
+Zone Atlantic/Faeroe -0:27:04 - LMT 1908 Jan 11 # Torshavn
+ 0:00 - WET 1981
+ 0:00 EU WE%sT
+#
+# 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
+# rules at least through 1984. Shanks says Scoresbysund and Godthab
+# used C-Eur rules after 1980, but IATA SSIM (1991/1996) says they use EU
+# rules since at least 1991. Assume EU rules since 1980.
+
+# From Gwillin Law (2001-06-06), citing
+# (2001-03-15),
+# and with translations corrected by Steffen Thorsen:
+#
+# Greenland has four local times, and the relation to UTC
+# is according to the following time line:
+#
+# The military zone near Thule UTC-4
+# Standard Greenland time UTC-3
+# Scoresbysund UTC-1
+# Danmarkshavn UTC
+#
+# In the military area near Thule and in Danmarkshavn DST will not be
+# introduced.
+
+# From Rives McDow (2001-11-01):
+#
+# I correspond regularly with the Dansk Polarcenter, and wrote them at
+# the time to clarify the situation in Thule. Unfortunately, I have
+# not heard back from them regarding my recent letter. [But I have
+# info from earlier correspondence.]
+#
+# According to the center, a very small local time zone around Thule
+# Air Base keeps the time according to UTC-4, implementing daylight
+# savings using North America rules, changing the time at 02:00 local time....
+#
+# The east coast of Greenland north of the community of Scoresbysund
+# uses UTC in the same way as in Iceland, year round, with no dst.
+# There are just a few stations on this coast, including the
+# Danmarkshavn ICAO weather station mentioned in your September 29th
+# email. The other stations are two sledge patrol stations in
+# Mestersvig and Daneborg, the air force base at Station Nord, and the
+# DPC research station at Zackenberg.
+#
+# Scoresbysund and two small villages nearby keep time UTC-1 and use
+# the same daylight savings time period as in West Greenland (Godthab).
+#
+# The rest of Greenland, including Godthab (this area, although it
+# includes central Greenland, is known as west Greenland), keeps time
+# UTC-3, with daylight savings methods according to European rules.
+#
+# It is common procedure to use UTC 0 in the wilderness of East and
+# North Greenland, because it is mainly Icelandic aircraft operators
+# maintaining traffic in these areas. However, the official status of
+# this area is that it sticks with Godthab time. This area might be
+# considered a dual time zone in some respects because of this.
+
+# From Rives McDow (2001-11-19):
+# I heard back from someone stationed at Thule; the time change took place
+# there at 2:00 AM.
+
+# From Paul Eggert (2001-11-19):
+# The 1997 CIA map shows Danmarkshavn on GMT; the 1995 map as like Godthab.
+# For lack of better info, assume they were like Godthab before 1996.
+# startkart.no says Thule does not observe DST, but this is clearly an error,
+# so go with Shanks for all Thule transitions.
+#
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Thule 1991 1992 - Mar lastSun 2:00 1:00 D
+Rule Thule 1991 1992 - Sep lastSun 2:00 0 S
+Rule Thule 1993 max - Apr Sun>=1 2:00 1:00 D
+Rule Thule 1993 max - Oct lastSun 2:00 0 S
+#
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Danmarkshavn -1:14:40 - LMT 1916 Jul 28
+ -3:00 - WGT 1980 Apr 6 2:00
+ -3:00 EU WG%sT 1996
+ 0:00 - GMT
+Zone America/Scoresbysund -1:29:00 - LMT 1916 Jul 28 # Ittoqqortoormiit
+ -2:00 - CGT 1980 Apr 6 2:00
+ -2:00 C-Eur CG%sT 1981 Mar 29
+ -1:00 EU EG%sT
+Zone America/Godthab -3:26:56 - LMT 1916 Jul 28 # Nuuk
+ -3:00 - WGT 1980 Apr 6 2:00
+ -3:00 EU WG%sT
+Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik air base
+ -4:00 Thule A%sT
+
+# Estonia
+# 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
(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
+# (confusing) rules for International Air and Railway Transport Schedules
+# conversion in Sunday connected with end of summer time in Estonia....
+# A discussion is running about the summer time efficiency and effect on
+# human physiology. It seems that Estonia maybe will not change to
+# summer time next spring.''
+
+# From Peter Ilieve
(1998-11-04), heavily edited:
+# The 1998-09-22 Estonian time law
+#
+# refers to the Eighth Directive and cites the association agreement between
+# the EU and Estonia, ratified by the Estonian law (RT II 1995, 22--27, 120).
+#
+# I also asked [my relative] whether they use any standard abbreviation
+# for their standard and summer times. He says no, they use "suveaeg"
+# (summer time) and "talveaeg" (winter time).
+
+# via Steffen Thorsen:
+# This year will mark the last time Estonia shifts to summer time,
+# a council of the ruling coalition announced Sept. 6....
+# But what this could mean for Estonia's chances of joining the European
+# Union are still unclear. In 1994, the EU declared summer time compulsory
+# for all member states until 2001. Brussels has yet to decide what to do
+# after that.
+
+# From Mart Oruaas (2000-01-29):
+# Regulation no. 301 (1999-10-12) obsoletes previous regulation
+# no. 206 (1998-09-22) and thus sticks Estonia to +02:00 GMT for all
+# the year round. The regulation is effective 1999-11-01.
+
+# From Toomas Soome (2002-02-21):
+# The Estonian government has changed once again timezone politics.
+# Now we are using again EU rules.
+#
+# From Urmet Jaanes (2002-03-28):
+# The legislative reference is Government decree No. 84 on 2002-02-21.
+
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone Europe/Tallinn 1:39:00 - LMT 1880
+ 1:39:00 - TMT 1918 Feb # Tallinn Mean Time
+ 1:00 C-Eur CE%sT 1919 Jul
+ 1:39:00 - TMT 1921 May
+ 2:00 - EET 1940 Aug 6
+ 3:00 - MSK 1941 Sep 15
+ 1:00 C-Eur CE%sT 1944 Sep 22
+ 3:00 Russia MSK/MSD 1989 Mar 26 2:00s
+ 2:00 1:00 EEST 1989 Sep 24 2:00s
+ 2:00 C-Eur EE%sT 1998 Sep 22
+ 2:00 EU EE%sT 1999 Nov 1
+ 2:00 - EET 2002 Feb 21
+ 2:00 EU EE%sT
+
+# Finland
+#
+# 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 (25 Sep 1994):
+# Shanks says Finland has switched at 02:00 standard time since 1981.
+# Go with Strang instead.
+#
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Finland 1942 only - Apr 3 0:00 1:00 S
+Rule Finland 1942 only - Oct 3 0:00 0 -
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone Europe/Helsinki 1:39:52 - LMT 1878 May 31
+ 1:39:52 - HMT 1921 May # Helsinki Mean Time
+ 2:00 Finland EE%sT 1981 Mar 29 2:00
+ 2:00 EU EE%sT
+
+# France
+
+# From Ciro Discepolo (2000-12-20):
+#
+# Henri Le Corre, Regimes Horaires pour le monde entier, Editions
+# Traditionnelles - Paris 2 books, 1993
+#
+# Gabriel, Traite de l'heure dans le monde, Guy Tredaniel editeur,
+# Paris, 1991
+#
+# Francoise Gauquelin, Problemes de l'heure resolus en astrologie,
+# Guy tredaniel, Paris 1987
+
+
+#
+# Shanks seems to use `24:00' ambiguously; we resolve it with Whitman.
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule France 1916 only - Jun 14 23:00s 1:00 S
+Rule France 1916 1919 - Oct Sun>=1 23:00s 0 -
+Rule France 1917 only - Mar 24 23:00s 1:00 S
+Rule France 1918 only - Mar 9 23:00s 1:00 S
+Rule France 1919 only - Mar 1 23:00s 1:00 S
+Rule France 1920 only - Feb 14 23:00s 1:00 S
+Rule France 1920 only - Oct 23 23:00s 0 -
+Rule France 1921 only - Mar 14 23:00s 1:00 S
+Rule France 1921 only - Oct 25 23:00s 0 -
+Rule France 1922 only - Mar 25 23:00s 1:00 S
+# DSH writes that a law of 1923-05-24 specified 3rd Sat in Apr at 23:00 to 1st
+# Sat in Oct at 24:00; and that in 1930, because of Easter, the transitions
+# were Apr 12 and Oct 5. Go with Shanks.
+Rule France 1922 1938 - Oct Sat>=1 23:00s 0 -
+Rule France 1923 only - May 26 23:00s 1:00 S
+Rule France 1924 only - Mar 29 23:00s 1:00 S
+Rule France 1925 only - Apr 4 23:00s 1:00 S
+Rule France 1926 only - Apr 17 23:00s 1:00 S
+Rule France 1927 only - Apr 9 23:00s 1:00 S
+Rule France 1928 only - Apr 14 23:00s 1:00 S
+Rule France 1929 only - Apr 20 23:00s 1:00 S
+Rule France 1930 only - Apr 12 23:00s 1:00 S
+Rule France 1931 only - Apr 18 23:00s 1:00 S
+Rule France 1932 only - Apr 2 23:00s 1:00 S
+Rule France 1933 only - Mar 25 23:00s 1:00 S
+Rule France 1934 only - Apr 7 23:00s 1:00 S
+Rule France 1935 only - Mar 30 23:00s 1:00 S
+Rule France 1936 only - Apr 18 23:00s 1:00 S
+Rule France 1937 only - Apr 3 23:00s 1:00 S
+Rule France 1938 only - Mar 26 23:00s 1:00 S
+Rule France 1939 only - Apr 15 23:00s 1:00 S
+Rule France 1939 only - Nov 18 23:00s 0 -
+Rule France 1940 only - Feb 25 2:00 1:00 S
+# The French rules for 1941-1944 were not used in Paris, but Shanks writes
+# that they were used in Monaco and in many French locations.
+# Le Corre writes that the upper limit of the free zone was Arneguy, Orthez,
+# Mont-de-Marsan, Bazas, Langon, Lamotte-Montravel, Marouil, La
+# Rochefoucault, Champagne-Mouton, La Roche-Posay, La Haye-Decartes,
+# Loches, Montrichard, Vierzon, Bourges, Moulins, Digoin,
+# Paray-le-Monial, Montceau-les-Mines, Chalons-sur-Saone, Arbois,
+# 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,
+# 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
+Rule France 1942 only - Mar 9 0:00 2:00 M
+Rule France 1942 only - Nov 2 3:00 1:00 S
+Rule France 1943 only - Mar 29 2:00 2:00 M
+Rule France 1943 only - Oct 4 3:00 1:00 S
+Rule France 1944 only - Apr 3 2:00 2:00 M
+Rule France 1944 only - Oct 8 1:00 1:00 S
+Rule France 1945 only - Apr 2 2:00 2:00 M
+Rule France 1945 only - Sep 16 3:00 0 -
+# Shanks gives Mar 28 2:00 and Sep 26 3:00;
+# go with Excoffier's 28/3/76 0hUT and 25/9/76 23hUT.
+Rule France 1976 only - Mar 28 1:00 1:00 S
+Rule France 1976 only - Sep 26 1:00 0 -
+# Shanks gives 0:09 for Paris Mean Time, and Whitman gives 0:09:05,
+# but Howse quotes the actual French legislation as saying 0:09:21.
+# Go with Howse. Howse writes that the time in France was officially based
+# on PMT-0:09:21 until 1978-08-09, when the time base finally switched to UTC.
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone Europe/Paris 0:09:21 - LMT 1891 Mar 15 0:01
+ 0:09:21 - PMT 1911 Mar 11 0:01 # Paris MT
+# Shanks gives 1940 Jun 14 0:00; go with Excoffier and Le Corre.
+ 0:00 France WE%sT 1940 Jun 14 23:00
+# Le Corre says Paris stuck with occupied-France time after the liberation;
+# go with Shanks.
+ 1:00 C-Eur CE%sT 1944 Aug 25
+ 0:00 France WE%sT 1945 Sep 16 3:00
+ 1:00 France CE%sT 1977
+ 1:00 EU CE%sT
+
+# Germany
+
+# 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.]
+
+# From Joerg Schilling (2002-10-23):
--- /dev/null
+# @(#)factory 7.3
+
+# For companies who don't want to put time zone specification in
+# their installation procedures. When users run date, they'll get the message.
+# Also useful for the "comp.sources" version.
+
+# Zone NAME GMTOFF RULES FORMAT
+Zone Factory 0 - "Local time zone must be set--see zic manual page"
--- /dev/null
+# ISO 3166 alpha-2 country codes
+#
+# @(#)iso3166.tab 1.14
+#
+# From Paul Eggert (2003-02-04):
+#
+# This file contains a table with the following columns:
+# 1. ISO 3166-1 alpha-2 country code, current as of
+# ISO 3166-1 Newsletter No. V-8 (2003-07-23). See:
+# ISO 3166 Maintenance agency (ISO 3166/MA)
+# .
+# 2. The usual English name for the country,
+# chosen so that alphabetic sorting of subsets produces helpful lists.
+# This is not the same as the English name in the ISO 3166 tables.
+#
+# Columns are separated by a single tab.
+# The table is sorted by country code.
+#
+# Lines beginning with `#' are comments.
+#
+#country-
+#code country name
+AD Andorra
+AE United Arab Emirates
+AF Afghanistan
+AG Antigua & Barbuda
+AI Anguilla
+AL Albania
+AM Armenia
+AN Netherlands Antilles
+AO Angola
+AQ Antarctica
+AR Argentina
+AS Samoa (American)
+AT Austria
+AU Australia
+AW Aruba
+AZ Azerbaijan
+BA Bosnia & Herzegovina
+BB Barbados
+BD Bangladesh
+BE Belgium
+BF Burkina Faso
+BG Bulgaria
+BH Bahrain
+BI Burundi
+BJ Benin
+BM Bermuda
+BN Brunei
+BO Bolivia
+BR Brazil
+BS Bahamas
+BT Bhutan
+BV Bouvet Island
+BW Botswana
+BY Belarus
+BZ Belize
+CA Canada
+CC Cocos (Keeling) Islands
+CD Congo (Dem. Rep.)
+CF Central African Rep.
+CG Congo (Rep.)
+CH Switzerland
+CI Cote d'Ivoire
+CK Cook Islands
+CL Chile
+CM Cameroon
+CN China
+CO Colombia
+CR Costa Rica
+CS Serbia and Montenegro
+CU Cuba
+CV Cape Verde
+CX Christmas Island
+CY Cyprus
+CZ Czech Republic
+DE Germany
+DJ Djibouti
+DK Denmark
+DM Dominica
+DO Dominican Republic
+DZ Algeria
+EC Ecuador
+EE Estonia
+EG Egypt
+EH Western Sahara
+ER Eritrea
+ES Spain
+ET Ethiopia
+FI Finland
+FJ Fiji
+FK Falkland Islands
+FM Micronesia
+FO Faeroe Islands
+FR France
+GA Gabon
+GB Britain (UK)
+GD Grenada
+GE Georgia
+GF French Guiana
+GH Ghana
+GI Gibraltar
+GL Greenland
+GM Gambia
+GN Guinea
+GP Guadeloupe
+GQ Equatorial Guinea
+GR Greece
+GS South Georgia & the South Sandwich Islands
+GT Guatemala
+GU Guam
+GW Guinea-Bissau
+GY Guyana
+HK Hong Kong
+HM Heard Island & McDonald Islands
+HN Honduras
+HR Croatia
+HT Haiti
+HU Hungary
+ID Indonesia
+IE Ireland
+IL Israel
+IN India
+IO British Indian Ocean Territory
+IQ Iraq
+IR Iran
+IS Iceland
+IT Italy
+JM Jamaica
+JO Jordan
+JP Japan
+KE Kenya
+KG Kyrgyzstan
+KH Cambodia
+KI Kiribati
+KM Comoros
+KN St Kitts & Nevis
+KP Korea (North)
+KR Korea (South)
+KW Kuwait
+KY Cayman Islands
+KZ Kazakhstan
+LA Laos
+LB Lebanon
+LC St Lucia
+LI Liechtenstein
+LK Sri Lanka
+LR Liberia
+LS Lesotho
+LT Lithuania
+LU Luxembourg
+LV Latvia
+LY Libya
+MA Morocco
+MC Monaco
+MD Moldova
+MG Madagascar
+MH Marshall Islands
+MK Macedonia
+ML Mali
+MM Myanmar (Burma)
+MN Mongolia
+MO Macau
+MP Northern Mariana Islands
+MQ Martinique
+MR Mauritania
+MS Montserrat
+MT Malta
+MU Mauritius
+MV Maldives
+MW Malawi
+MX Mexico
+MY Malaysia
+MZ Mozambique
+NA Namibia
+NC New Caledonia
+NE Niger
+NF Norfolk Island
+NG Nigeria
+NI Nicaragua
+NL Netherlands
+NO Norway
+NP Nepal
+NR Nauru
+NU Niue
+NZ New Zealand
+OM Oman
+PA Panama
+PE Peru
+PF French Polynesia
+PG Papua New Guinea
+PH Philippines
+PK Pakistan
+PL Poland
+PM St Pierre & Miquelon
+PN Pitcairn
+PR Puerto Rico
+PS Palestine
+PT Portugal
+PW Palau
+PY Paraguay
+QA Qatar
+RE Reunion
+RO Romania
+RU Russia
+RW Rwanda
+SA Saudi Arabia
+SB Solomon Islands
+SC Seychelles
+SD Sudan
+SE Sweden
+SG Singapore
+SH St Helena
+SI Slovenia
+SJ Svalbard & Jan Mayen
+SK Slovakia
+SL Sierra Leone
+SM San Marino
+SN Senegal
+SO Somalia
+SR Suriname
+ST Sao Tome & Principe
+SV El Salvador
+SY Syria
+SZ Swaziland
+TC Turks & Caicos Is
+TD Chad
+TF French Southern & Antarctic Lands
+TG Togo
+TH Thailand
+TJ Tajikistan
+TK Tokelau
+TL East Timor
+TM Turkmenistan
+TN Tunisia
+TO Tonga
+TR Turkey
+TT Trinidad & Tobago
+TV Tuvalu
+TW Taiwan
+TZ Tanzania
+UA Ukraine
+UG Uganda
+UM US minor outlying islands
+US United States
+UY Uruguay
+UZ Uzbekistan
+VA Vatican City
+VC St Vincent
+VE Venezuela
+VG Virgin Islands (UK)
+VI Virgin Islands (US)
+VN Vietnam
+VU Vanuatu
+WF Wallis & Futuna
+WS Samoa (Western)
+YE Yemen
+YT Mayotte
+ZA South Africa
+ZM Zambia
+ZW Zimbabwe
--- /dev/null
+# @(#)leapseconds 7.16
+
+# Allowance for leapseconds added to each timezone file.
+
+# The International Earth Rotation Service periodically uses leap seconds
+# to keep UTC to within 0.9 s of UT1
+# (which measures the true angular orientation of the earth in space); see
+# Terry J Quinn, The BIPM and the accurate measure of time,
+# Proc IEEE 79, 7 (July 1991), 894-905.
+# There were no leap seconds before 1972, because the official mechanism
+# accounting for the discrepancy between atomic time and the earth's rotation
+# did not exist until the early 1970s.
+
+# The correction (+ or -) is made at the given time, so lines
+# will typically look like:
+# Leap YEAR MON DAY 23:59:60 + R/S
+# or
+# Leap YEAR MON DAY 23:59:59 - R/S
+
+# If the leapsecond is Rolling (R) the given time is local time
+# If the leapsecond is Stationary (S) the given time is UTC
+
+# Leap YEAR MONTH DAY HH:MM:SS CORR R/S
+Leap 1972 Jun 30 23:59:60 + S
+Leap 1972 Dec 31 23:59:60 + S
+Leap 1973 Dec 31 23:59:60 + S
+Leap 1974 Dec 31 23:59:60 + S
+Leap 1975 Dec 31 23:59:60 + S
+Leap 1976 Dec 31 23:59:60 + S
+Leap 1977 Dec 31 23:59:60 + S
+Leap 1978 Dec 31 23:59:60 + S
+Leap 1979 Dec 31 23:59:60 + S
+Leap 1981 Jun 30 23:59:60 + S
+Leap 1982 Jun 30 23:59:60 + S
+Leap 1983 Jun 30 23:59:60 + S
+Leap 1985 Jun 30 23:59:60 + S
+Leap 1987 Dec 31 23:59:60 + S
+Leap 1989 Dec 31 23:59:60 + S
+Leap 1990 Dec 31 23:59:60 + S
+Leap 1992 Jun 30 23:59:60 + S
+Leap 1993 Jun 30 23:59:60 + S
+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
+
+# INTERNATIONAL EARTH ROTATION SERVICE (IERS)
+# SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE
+#
+# 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
+#
+# Paris, 1 July 2003
+#
+# Bulletin C 26
+#
+# 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 December 2003.
+# 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
+# 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
+# will be no time step at the next possible date.
+#
+# Daniel GAMBIS
+# Director
+# Earth Orientation Center of IERS
--- /dev/null
+# @(#)northamerica 7.67
+# 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
+
+# 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).
+
+###############################################################################
+
+# United States
+
+# From Paul Eggert (1999-03-31):
+# Howse writes (pp 121-125) that time zones were invented by
+# Professor Charles Ferdinand Dowd (1825-1904),
+# Principal of Temple Grove Ladies' Seminary (Saratoga Springs, NY).
+# His pamphlet ``A System of National Time for Railroads'' (1870)
+# was the result of his proposals at the Convention of Railroad Trunk Lines
+# in New York City (1869-10). His 1870 proposal was based on Washington, DC,
+# but in 1872-05 he moved the proposed origin to Greenwich.
+# 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 (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.
+
+# From Paul Eggert (2001-03-06):
+# Daylight Saving Time was first suggested as a joke by Benjamin Franklin
+# in his whimsical essay ``An Economical Project for Diminishing the Cost
+# of Light'' published in the Journal de Paris (1784-04-26).
+# Not everyone is happy with the results:
+#
+# I don't really care how time is reckoned so long as there is some
+# agreement about it, but I object to being told that I am saving
+# daylight when my reason tells me that I am doing nothing of the kind.
+# I even object to the implication that I am wasting something
+# valuable if I stay in bed after the sun has risen. As an admirer
+# of moonlight I resent the bossy insistence of those who want to
+# reduce my time for enjoying it. At the back of the Daylight Saving
+# scheme I detect the bony, blue-fingered hand of Puritanism, eager
+# 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
+#
+# For more about the first ten years of DST in the United States, see
+# Ten years of daylight saving from the Pittsburgh standpoint
+# (Carnegie Library of Pittsburgh, 1927).
+#
+# Shanks says that DST was called "War Time" in the US in 1918 and 1919.
+# However, DST was imposed by the Standard Time Act of 1918, which
+# was the first nationwide legal time standard, and apparently
+# time was just called "Standard Time" or "Daylight Saving Time".
+
+# From Arthur David Olson:
+# US Daylight Saving Time ended on the last Sunday of *October* in 1974.
+# See, for example, the front page of the Saturday, 1974-10-26
+# and Sunday, 1974-10-27 editions of the Washington Post.
+
+# From Arthur David Olson:
+# Before the Uniform Time Act of 1966 took effect in 1967, observance of
+# Daylight Saving Time in the US was by local option, except during wartime.
+
+# From Arthur David Olson (2000-09-25):
+# Last night I heard part of a rebroadcast of a 1945 Arch Oboler radio drama.
+# In the introduction, Oboler spoke of "Eastern Peace Time."
+# An AltaVista search turned up
+# "When the time is announced over the radio now, it is 'Eastern Peace
+# Time' instead of the old familiar 'Eastern War Time.' Peace is wonderful."
+# (August 1945) by way of confirmation.
+
+# 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
+# never got to hear his speech live. According to one press account,
+# CBS' Bob Trout was first to announce the word of Japan's surrender,
+# but a few seconds later, NBC, ABC and Mutual also flashed the word
+# of surrender, all of whom interrupting the bells of Big Ben in
+# London which were to precede Mr. Attlee's speech.
+
+# From Paul Eggert (2003-02-09): It was Robert St John, not Bob Trout. From
+# Myrna Oliver's obituary of St John on page B16 of today's Los Angeles Times:
+#
+# ... a war-weary U.S. clung to radios, awaiting word of Japan's surrender.
+# Any announcement from Asia would reach St. John's New York newsroom on a
+# wire service teletype machine, which had prescribed signals for major news.
+# Associated Press, for example, would ring five bells before spewing out
+# typed copy of an important story, and 10 bells for news "of transcendental
+# importance."
+#
+# On Aug. 14, stalling while talking steadily into the NBC networks' open
+# microphone, St. John heard five bells and waited only to hear a sixth bell,
+# before announcing confidently: "Ladies and gentlemen, World War II is over.
+# The Japanese have agreed to our surrender terms."
+#
+# He had scored a 20-second scoop on other broadcasters.
+
+# 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 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
+# H.R.177
+# (introduced 1999-01-06) would change April to March in the above rule.
+
+# From Bob Devine (1988-01-28):
+# ...Alaska (and Hawaii) had the timezone names changed in 1967.
+# old new
+# Pacific Standard Time(PST) -same-
+# Yukon Standard Time(YST) -same-
+# Central Alaska S.T. (CAT) Alaska-Hawaii St[an]dard Time (AHST)
+# Nome Standard Time (NT) Bering Standard Time (BST)
+#
+# ...Alaska's timezone lines were redrawn in 1983 to give only 2 tz.
+# The YST zone now covers nearly all of the state, AHST just part
+# of the Aleutian islands. No DST.
+
+# From Paul Eggert (1995-12-19):
+# The tables below use `NST', not `NT', for Nome Standard Time.
+# I invented `CAWT' for Central Alaska War Time.
+
+# From U. S. Naval Observatory (1989-01-19):
+# USA EASTERN 5 H BEHIND UTC NEW YORK, WASHINGTON
+# USA EASTERN 4 H BEHIND UTC APR 3 - OCT 30
+# USA CENTRAL 6 H BEHIND UTC CHICAGO, HOUSTON
+# USA CENTRAL 5 H BEHIND UTC APR 3 - OCT 30
+# USA MOUNTAIN 7 H BEHIND UTC DENVER
+# USA MOUNTAIN 6 H BEHIND UTC APR 3 - OCT 30
+# USA PACIFIC 8 H BEHIND UTC L.A., SAN FRANCISCO
+# USA PACIFIC 7 H BEHIND UTC APR 3 - OCT 30
+# USA ALASKA STD 9 H BEHIND UTC MOST OF ALASKA (AKST)
+# USA ALASKA STD 8 H BEHIND UTC APR 3 - OCT 30 (AKDT)
+# USA ALEUTIAN 10 H BEHIND UTC ISLANDS WEST OF 170W
+# USA - " - 9 H BEHIND UTC APR 3 - OCT 30
+# USA HAWAII 10 H BEHIND UTC
+# USA BERING 11 H BEHIND UTC SAMOA, MIDWAY
+
+# From Arthur David Olson (1989-01-21):
+# The above dates are for 1988.
+# Note the "AKST" and "AKDT" abbreviations, the claim that there's
+# no DST in Samoa, and the claim that there is DST in Alaska and the
+# Aleutians.
+
+# From Arthur David Olson (1988-02-13):
+# Legal standard time zone names, from United States Code (1982 Edition and
+# Supplement III), Title 15, Chapter 6, Section 260 and forward. First, names
+# up to 1967-04-01 (when most provisions of the Uniform Time Act of 1966
+# took effect), as explained in sections 263 and 261:
+# (none)
+# United States standard eastern time
+# United States standard mountain time
+# United States standard central time
+# United States standard Pacific time
+# (none)
+# United States standard Alaska time
+# (none)
+# Next, names from 1967-04-01 until 1983-11-30 (the date for
+# public law 98-181):
+# Atlantic standard time
+# eastern standard time
+# central standard time
+# mountain standard time
+# Pacific standard time
+# Yukon standard time
+# Alaska-Hawaii standard time
+# Bering standard time
+# And after 1983-11-30:
+# Atlantic standard time
+# eastern standard time
+# central standard time
+# mountain standard time
+# Pacific standard time
+# Alaska standard time
+# Hawaii-Aleutian standard time
+# Samoa standard time
+# The law doesn't give abbreviations.
+#
+# From Paul Eggert (1995-12-19):
+# Shanks uses 1983-10-30, not 1983-11-30, for the 1983 transitions.
+# Go with Shanks.
+#
+# From Paul Eggert (2000-01-08), following a heads-up from Rives McDow:
+# 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".
+
+
+# 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,
+# New Hampshire, New Jersey, New York, North Carolina, Ohio,
+# Pennsylvania, Rhode Island, South Carolina, eastern Tennessee,
+# Vermont, Virginia, West Virginia
+
+# 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
+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
+ -5:00 US E%sT 1920
+ -5:00 NYC E%sT 1942
+ -5:00 US E%sT 1946
+ -5:00 NYC E%sT 1967
+ -5:00 US E%sT
+
+# US central time, represented by Chicago
+
+# Alabama, Arkansas, Florida panhandle (Bay, Calhoun, Escambia,
+# Gulf, Holmes, Jackson, Okaloosa, Santa Rosa, Walton, and
+# Washington counties), Illinois, western Indiana
+# (Gibson, Jasper, Lake, LaPorte, Newton, Porter, Posey, Spencer,
+# Vanderburgh, and Warrick counties), Iowa, most of Kansas, western
+# Kentucky, Louisiana, Minnesota, Mississippi, Missouri, eastern
+# Nebraska, eastern North Dakota, Oklahoma, eastern South Dakota,
+# western Tennessee, most of Texas, Wisconsin
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
+Rule Chicago 1920 only - Jun 13 2:00 1:00 D
+Rule Chicago 1920 1921 - Oct lastSun 2:00 0 S
+Rule Chicago 1921 only - Mar lastSun 2:00 1:00 D
+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
+ -6:00 US C%sT 1920
+ -6:00 Chicago C%sT 1936 Mar 1 2:00
+ -5:00 - EST 1936 Nov 15 2:00
+ -6:00 Chicago C%sT 1942
+ -6:00 US C%sT 1946
+ -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
+ -7:00 US M%sT 1992 Oct 25 02:00
+ -6:00 US C%sT
+
+# US mountain time, represented by Denver
+#
+# Colorado, far western Kansas, Montana, western
+# Nebraska, Nevada border (Jackpot, Owyhee, and Mountain City),
+# New Mexico, southwestern North Dakota, far eastern Oregon,
+# western South Dakota, far western Texas (El Paso County, Hudspeth County,
+# and Pine Springs and Nickel Creek in Culberson County), Utah, Wyoming
+#
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
+Rule Denver 1920 1921 - Mar lastSun 2:00 1:00 D
+Rule Denver 1920 only - Oct lastSun 2:00 0 S
+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
+ -7:00 US M%sT 1920
+ -7:00 Denver M%sT 1942
+ -7:00 US M%sT 1946
+ -7:00 Denver M%sT 1967
+ -7:00 US M%sT
+
+# US Pacific time, represented by Los Angeles
+#
+# California, northern Idaho (Benewah, Bonner, Boundary, Clearwater,
+# Idaho, Kootenai, Latah, Lewis, Nez Perce, and Shoshone counties),
+# most of Nevada, most of Oregon, and Washington
+#
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
+Rule CA 1948 only - Mar 14 2:00 1:00 D
+Rule CA 1949 only - Jan 1 2:00 0 S
+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
+ -8:00 US P%sT 1946
+ -8:00 CA P%sT 1967
+ -8:00 US P%sT
+
+# Alaska
+# AK%sT is the modern abbreviation for -9:00 per USNO.
+#
+# From Paul Eggert (2001-05-30):
+# Howse writes that Alaska switched from the Julian to the Gregorian calendar,
+# and from east-of-GMT to west-of-GMT days, when the US bought it from Russia.
+# This was on 1867-10-18, a Friday; the previous day was 1867-10-06 Julian,
+# also a Friday. Include only the time zone part of this transition,
+# ignoring the switch from Julian to Gregorian, since we can't represent
+# the Julian calendar.
+#
+# As far as we know, none of the exact locations mentioned below were
+# permanently inhabited in 1867 by anyone using either calendar.
+# (Yakutat was colonized by the Russians in 1799, but the settlement
+# was destroyed in 1805 by a Yakutat-kon war party.) However, there
+# were nearby inhabitants in some cases and for our purposes perhaps
+# it's best to simply use the official transition.
+#
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Juneau 15:02:19 - LMT 1867 Oct 18
+ -8:57:41 - LMT 1900 Aug 20 12:00
+ -8:00 - PST 1942
+ -8:00 US P%sT 1946
+ -8:00 - PST 1969
+ -8:00 US P%sT 1983 Oct 30 2:00
+ -9:00 US AK%sT
+Zone America/Yakutat 14:41:05 - LMT 1867 Oct 18
+ -9:18:55 - LMT 1900 Aug 20 12:00
+ -9:00 - YST 1942
+ -9:00 US Y%sT 1946
+ -9:00 - YST 1969
+ -9:00 US Y%sT 1983 Oct 30 2:00
+ -9:00 US AK%sT
+Zone America/Anchorage 14:00:24 - LMT 1867 Oct 18
+ -9:59:36 - LMT 1900 Aug 20 12:00
+ -10:00 - CAT 1942
+ -10:00 US CAT/CAWT 1946
+ -10:00 - CAT 1967 Apr
+ -10:00 - AHST 1969
+ -10:00 US AH%sT 1983 Oct 30 2:00
+ -9:00 US AK%sT
+Zone America/Nome 12:58:21 - LMT 1867 Oct 18
+ -11:01:38 - LMT 1900 Aug 20 12:00
+ -11:00 - NST 1942
+ -11:00 US N%sT 1946
+ -11:00 - NST 1967 Apr
+ -11:00 - BST 1969
+ -11:00 US B%sT 1983 Oct 30 2:00
+ -9:00 US AK%sT
+Zone America/Adak 12:13:21 - LMT 1867 Oct 18
+ -11:46:38 - LMT 1900 Aug 20 12:00
+ -11:00 - NST 1942
+ -11:00 US N%sT 1946
+ -11:00 - NST 1967 Apr
+ -11:00 - BST 1969
+ -11:00 US B%sT 1983 Oct 30 2:00
+ -10:00 US HA%sT
+# 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.
+
+# Hawaii
+#
+# From Arthur David Olson:
+# And then there's Hawaii.
+# DST was observed for one day in 1933;
+# standard time was changed by half an hour in 1947;
+# it's always standard as of 1986.
+#
+# From Paul Eggert:
+# Shanks says the 1933 experiment lasted for three weeks. Go with Shanks.
+#
+Zone Pacific/Honolulu -10:31:26 - LMT 1900 Jan 1 12:00
+ -10:30 - HST 1933 Apr 30 2:00
+ -10:30 1:00 HDT 1933 May 21 2:00
+ -10:30 US H%sT 1947 Jun 8 2:00
+ -10:00 - HST
+
+# Now we turn to US areas that have diverged from the consensus since 1970.
+
+# Arizona mostly uses MST.
+
+# From Paul Eggert (2002-10-20):
+#
+# The information in the rest of this paragraph is derived from the
+# Daylight Saving Time web page (2002-01-23) maintained by the
+# Arizona State Library, Archives and Public Records.
+# Between 1944-01-01 and 1944-04-01 the State of Arizona used standard
+# time, but by federal law railroads, airlines, bus lines, military
+# personnel, and some engaged in interstate commerce continued to
+# observe war (i.e., daylight saving) time. The 1944-03-17 Phoenix
+# Gazette says that was the date the law changed, and that 04-01 was
+# the date the state's clocks would change. In 1945 the State of
+# Arizona used standard time all year, again with exceptions only as
+# mandated by federal law. Arizona observed DST in 1967, but Arizona
+# Laws 1968, ch. 183 (effective 1968-03-21) repealed DST.
+#
+# 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
+ -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
+ -7:00 - MST 1967
+ -7:00 US M%sT 1968 Mar 21
+ -7:00 - MST
+# From Arthur David Olson (1988-02-13):
+# A writer from the Inter Tribal Council of Arizona, Inc.,
+# notes in private correspondence dated 1987-12-28 that "Presently, only the
+# Navajo Nation participates in the Daylight Saving Time policy, due to its
+# large size and location in three states." (The "only" means that other
+# tribal nations don't use DST.)
+
+Link America/Denver America/Shiprock
+
+# Southern Idaho (Ada, Adams, Bannock, Bear Lake, Bingham, Blaine,
+# Boise, Bonneville, Butte, Camas, Canyon, Caribou, Cassia, Clark,
+# Custer, Elmore, Franklin, Fremont, Gem, Gooding, Jefferson, Jerome,
+# 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
+ -8:00 US P%sT 1923 May 13 2:00
+ -7:00 US M%sT 1974
+ -7:00 - MST 1974 Feb 3 2:00
+ -7:00 US M%sT
+
+# Indiana
+#
+# For a map of Indiana's time zone regions, see:
+# What time is it in Indiana?
+# (1999-04-06)
+#
+# 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.
+#
+# 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.
+#
+# 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.
+
+# 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
+ -6:00 US C%sT 1920
+ -6:00 Indianapolis C%sT 1942
+ -6:00 US C%sT 1946
+ -6:00 Indianapolis C%sT 1955 Apr 24 2:00
+ -5:00 - EST 1957 Sep 29 2: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
+#
+# Part of Crawford County, Indiana, last observed DST in 1975,
+# and left its clocks alone in 1974.
+# 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
+ -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
+#
+# Starke County, Indiana
+# 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
+# 1991-10-27.
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
+Rule Starke 1947 1961 - Apr lastSun 2:00 1:00 D
+Rule Starke 1947 1954 - Sep lastSun 2:00 0 S
+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
+ -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
+#
+# Switzerland County, Indiana, last observed DST in 1972.
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Indiana/Vevay -5:40:16 - LMT 1883 Nov 18 12:00
+ -6:00 US C%sT 1954 Apr 25 2:00
+ -5:00 - EST 1969
+ -5:00 US E%sT 1973
+ -5:00 - EST
+
+# Part of Kentucky left its clocks alone in 1974.
+# This also includes a part of Indiana immediately adjacent to Louisville.
+# 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
+Rule Louisville 1941 1961 - Apr lastSun 2:00 1:00 D
+Rule Louisville 1941 only - Sep lastSun 2:00 0 S
+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
+ -6:00 US C%sT 1921
+ -6:00 Louisville C%sT 1942
+ -6:00 US C%sT 1946
+ -6:00 Louisville C%sT 1961 Jul 23 2:00
+ -5:00 - EST 1968
+ -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
+#
+# From
+# Lake Cumberland LIFE
+# (1999-01-29) via WKYM-101.7:
+# Clinton County has joined Wayne County in asking the DoT to change from
+# the Central to the Eastern time zone.... The Wayne County government made
+# the same request in December. And while Russell County officials have not
+# taken action, the majority of respondents to a poll conducted there in
+# August indicated they would like to change to "fast time" also.
+# The three Lake Cumberland counties are the farthest east of any U.S.
+# location in the Central time zone.
+#
+# From Rich Wales (2000-08-29):
+# After prolonged debate, and despite continuing deep differences of opinion,
+# Wayne County (central Kentucky) is switching from Central (-0600) to Eastern
+# (-0500) time. They won't "fall back" this year. See Sara Shipley,
+# The difference an hour makes, Nando Times (2000-08-29 15:33 -0400).
+#
+# From Paul Eggert (2001-07-16):
+# The final rule was published in the
+# Federal Register 65, 160 (2000-08-17), page 50154-50158.
+#
+#
+Zone America/Kentucky/Monticello -5:39:24 - LMT 1883 Nov 18 12:00
+ -6:00 US C%sT 1946
+ -6:00 - CST 1968
+ -6:00 US C%sT 2000 Oct 29 2:00
+ -5:00 US E%sT
+
+
+# From Rives McDow (2000-08-30):
+# Here ... are all the changes in the US since 1985.
+# Kearny County, KS (put all of county on central;
+# previously split between MST and CST) ... 1990-10
+# Starke County, IN (from CST to EST) ... 1991-10
+# Oliver County, ND (from MST to CST) ... 1992-10
+# West Wendover, NV (from PST TO MST) ... 1999-10
+# Wayne County, KY (from CST to EST) ... 2000-10
+#
+# From Paul Eggert (2001-07-17):
+# We don't know where the line used to be within Kearny County, KS,
+# so omit that change for now.
+# See America/Indiana/Knox for the Starke County, IN change.
+# See America/North_Dakota/Center for the Oliver County, ND change.
+# West Wendover, NV officially switched from Pacific to mountain time on
+# 1999-10-31. See the
+# Federal Register 64, 203 (1999-10-21), page 56705-56707.
+#
+# However, the Federal Register says that West Wendover already operated
+# on mountain time, and the rule merely made this official;
+# hence a separate tz entry is not needed.
+
+# Michigan
+#
+# From Bob Devine (1988-01-28):
+# Michigan didn't observe DST from 1968 to 1973.
+#
+# From Paul Eggert (1999-03-31):
+# Shanks writes that Michigan started using standard time on 1885-09-18,
+# but Howse writes (pp 124-125, referring to Popular Astronomy, 1901-01)
+# that Detroit kept
+#
+# local time until 1900 when the City Council decreed that clocks should
+# be put back twenty-eight minutes to Central Standard Time. Half the
+# city obeyed, half refused. After considerable debate, the decision
+# was rescinded and the city reverted to Sun time. A derisive offer to
+# erect a sundial in front of the city hall was referred to the
+# Committee on Sewers. Then, in 1905, Central time was adopted
+# by city vote.
+#
+# This story is too entertaining to be false, so go with Howse over Shanks.
+#
+# From Paul Eggert (2001-03-06):
+# Garland (1927) writes ``Cleveland and Detroit advanced their clocks
+# one hour in 1914.'' This change is not in Shanks. We have no more
+# info, so omit this for now.
+#
+# Most of Michigan observed DST from 1973 on, but was a bit late in 1975.
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER
+Rule Detroit 1948 only - Apr lastSun 2:00 1:00 D
+Rule Detroit 1948 only - Sep lastSun 2:00 0 S
+Rule Detroit 1967 only - Jun 14 2:00 1:00 D
+Rule Detroit 1967 only - Oct lastSun 2:00 0 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Detroit -5:32:11 - LMT 1905
+ -6:00 - CST 1915 May 15 2:00
+ -5:00 - EST 1942
+ -5:00 US E%sT 1946
+ -5:00 Detroit E%sT 1973
+ -5:00 US E%sT 1975
+ -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.
+# 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
+Rule Menominee 1966 only - Apr lastSun 2:00 1:00 D
+Rule Menominee 1966 only - Oct lastSun 2:00 0 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Menominee -5:50:27 - LMT 1885 Sep 18 12:00
+ -6:00 US C%sT 1946
+ -6:00 Menominee C%sT 1969 Apr 27 2:00
+ -5:00 - EST 1973 Apr 29 2:00
+ -6:00 US C%sT
+
+# Navassa
+# administered by the US Fish and Wildlife Service
+# claimed by US under the provisions of the 1856 Guano Islands Act
+# also claimed by Haiti
+# occupied 1857/1900 by the Navassa Phosphate Co
+# US lighthouse 1917/1996-09
+# currently uninhabited
+# see Mark Fineman, ``An Isle Rich in Guano and Discord'',
+# _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 (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).
+#
+# Gwillim Law writes that a good source
+# for recent time zone data is the International Air Transport
+# Association's Standard Schedules Information Manual (IATA SSIM),
+# published semiannually. Law sent in several helpful summaries
+# of the IATA's data after 1990.
+#
+# Except where otherwise noted, Shanks is the source for entries through 1990,
+# and IATA SSIM is the source for entries after 1990.
+#
+# Other sources occasionally used include:
+#
+# Edward W. Whitman, World Time Differences,
+# Whitman Publishing Co, 2 Niagara Av, Ealing, London (undated),
+# which I found in the UCLA library.
+#
+# William Willett, The Waste of Daylight, 19th edition
+# (1914-03)
+#
+# See the `europe' file for Greenland.
+
+# Canada
+
+# From Alain LaBont
(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....
+#
+# UTC Standard time Daylight savings time
+# offset French English French English
+# -2:30 - - HAT NDT
+# -3 - - HAA ADT
+# -3:30 HNT NST - -
+# -4 HNA AST HAE EDT
+# -5 HNE EST HAC CDT
+# -6 HNC CST HAR MDT
+# -7 HNR MST HAP PDT
+# -8 HNP PST HAY YDT
+# -9 HNY YST - -
+#
+# HN: Heure Normale ST: Standard Time
+# HA: Heure Avance DT: Daylight saving Time
+#
+# A: de l'Atlantique Atlantic
+# C: du Centre Central
+# E: de l'Est Eastern
+# M: Mountain
+# N: Newfoundland
+# P: du Pacifique Pacific
+# R: des Rocheuses
+# T: de Terre-Neuve
+# Y: du Yukon Yukon
+#
+# 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):
+# H. David Matthews and Mary Vincent's map
+# "It's about TIME", _Canadian Geographic_ (September-October 1998)
+# contains detailed boundaries for regions observing nonstandard
+# time and daylight saving time arrangements in Canada circa 1998.
+#
+# INMS, the Institute for National Measurement Standards in Ottawa, has
+# information about standard and daylight saving time zones in Canada.
+# (updated periodically).
+# Its unofficial information is often taken from Matthews and Vincent.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Canada 1918 only - Apr 14 2:00 1:00 D
+Rule Canada 1918 only - Oct 31 2:00 0 S
+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
+
+
+# Newfoundland (and far southeast Labrador)
+
+# From Paul Eggert (2000-10-02):
+# Matthews and Vincent (1998) write that Labrador should use NST/NDT,
+# but the only part of Labrador that follows the rules is the
+# southeast corner, including Port Hope Simpson and Mary's Harbour,
+# but excluding, say, Black Tickle.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule StJohns 1917 only - Apr 8 2:00 1:00 D
+Rule StJohns 1917 only - Sep 17 2:00 0 S
+# Whitman gives 1919 Apr 5 and 1920 Apr 5; go with Shanks.
+Rule StJohns 1919 only - May 5 23:00 1:00 D
+Rule StJohns 1919 only - Aug 12 23:00 0 S
+# For 1931-1935 Whitman gives Apr same date; go with Shanks.
+Rule StJohns 1920 1935 - May Sun>=1 23:00 1:00 D
+Rule StJohns 1920 1935 - Oct lastSun 23:00 0 S
+# For 1936-1941 Whitman gives May Sun>=8 and Oct Sun>=1; go with Shanks.
+Rule StJohns 1936 1941 - May Mon>=9 0:00 1:00 D
+Rule StJohns 1936 1941 - Oct Mon>=2 0:00 0 S
+# Whitman gives the following transitions:
+# 1942 03-01/12-31, 1943 05-30/09-05, 1944 07-10/09-02, 1945 01-01/10-07
+# but go with Shanks and assume they used Canadian rules.
+# For 1946-9 Whitman gives May 5,4,9,1 - Oct 1,5,3,2, and for 1950 he gives
+# Apr 30 - Sep 24; go with Shanks.
+Rule StJohns 1946 1950 - May Sun>=8 2:00 1:00 D
+Rule StJohns 1946 1950 - Oct Sun>=2 2:00 0 S
+Rule StJohns 1951 1986 - Apr lastSun 2:00 1:00 D
+Rule StJohns 1951 1959 - Sep lastSun 2:00 0 S
+Rule StJohns 1960 1986 - Oct lastSun 2:00 0 S
+# From Paul Eggert (2000-10-02):
+# INMS (2000-09-12) says that, since 1988 at least, Newfoundland switches
+# at 00:01 local time. For now, assume it started in 1987.
+Rule StJohns 1987 only - Apr Sun>=1 0:01 1:00 D
+Rule StJohns 1987 max - Oct lastSun 0:01 0 S
+Rule StJohns 1988 only - Apr Sun>=1 0:01 2:00 DD
+Rule StJohns 1989 max - Apr Sun>=1 0:01 1:00 D
+# St John's has an apostrophe, but Posix file names can't have apostrophes.
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/St_Johns -3:30:52 - LMT 1884
+ -3:30:52 StJohns N%sT 1918
+ -3:30:52 Canada N%sT 1919
+ -3:30:52 StJohns N%sT 1935 Mar 30
+ -3:30 StJohns N%sT 1942 May 11
+ -3:30 Canada N%sT 1946
+ -3:30 StJohns N%sT
+
+# most of east Labrador
+
+# The name `Happy Valley-Goose Bay' is too long; use `Goose Bay'.
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Goose_Bay -4:01:40 - LMT 1884 # Happy Valley-Goose Bay
+ -3:30:52 - NST 1918
+ -3:30:52 Canada N%sT 1919
+ -3:30:52 - NST 1935 Mar 30
+ -3:30 - NST 1936
+ -3:30 StJohns N%sT 1942 May 11
+ -3:30 Canada N%sT 1946
+ -3:30 StJohns N%sT 1966 Mar 15 2:00
+ -4:00 StJohns A%sT
+
+
+# west Labrador, New Brunswick, Nova Scotia, Prince Edward I
+
+# From Paul Eggert (1996-06-12):
+# Shanks writes that since 1970 most of this region has been like Halifax.
+# Many locales did not observe peacetime DST until 1972;
+# Glace Bay, NS is the largest that we know of.
+# 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
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Halifax -4:14:24 - LMT 1902 Jun 15
+ -4:00 Halifax A%sT 1918
+ -4:00 Canada A%sT 1919
+ -4:00 Halifax A%sT 1942 Feb 9 2:00s
+ -4:00 Canada A%sT 1946
+ -4:00 Halifax A%sT 1974
+ -4:00 Canada A%sT
+Zone America/Glace_Bay -3:59:48 - LMT 1902 Jun 15
+ -4:00 Canada A%sT 1953
+ -4:00 Halifax A%sT 1954
+ -4:00 - AST 1972
+ -4:00 Halifax A%sT 1974
+ -4:00 Canada A%sT
+
+
+# Ontario, Quebec
+
+# From Paul Eggert (1996-06-12):
+# Shanks writes that since 1970 most of Ontario has been like Toronto,
+# and most of Quebec has been like Montreal.
+# Thunder Bay skipped DST in 1973.
+# Many smaller locales did not observe peacetime DST until 1974;
+# Nipigon (EST) and Rainy River (CST) are the largest that we know of.
+# Far west Ontario is like Winnipeg; far east Quebec is like Halifax.
+
+# From Mark Brader (2003-07-26):
+# [According to the Toronto Star] Orillia, Ontario, adopted DST
+# effective Saturday, 1912-06-22, 22:00; the article mentions that
+# Port Arthur (now part of Thunder Bay, Ontario) as well as Moose Jaw
+# have already done so. In Orillia DST was to run until Saturday,
+# 1912-08-31 (no time mentioned), but it was met with considerable
+# hostility from certain segments of the public, and was revoked after
+# only two weeks -- I copied it as Saturday, 1912-07-07, 22:00, but
+# presumably that should be -07-06. (1912-06-19, -07-12; also letters
+# earlier in June).
+#
+# Kenora, Ontario, was to abandon DST on 1914-06-01 (-05-21).
+
+# From Paul Eggert (1997-10-17):
+# Mark Brader writes that an article in the 1997-10-14 Toronto Star
+# says that Atikokan, Ontario currently does not observe DST,
+# but will vote on 11-10 whether to use EST/EDT.
+# He also writes that the
+# Ontario Time Act (1990, Chapter T.9)
+#
+# says that Ontario east of 90W uses EST/EDT, and west of 90W uses CST/CDT.
+# Officially Atikokan is therefore on CST/CDT, and most likely this report
+# concerns a non-official time observed as a matter of local practice.
+# For what it's worth, Shanks says that Atikokan has agreed with
+# Rainy River ever since standard time was introduced.
+
+# From Paul Eggert (2000-10-02):
+# Matthews and Vincent (1998) write that Atikokan, Pickle Lake, and
+# New Osnaburgh observe CST all year, that Big Trout Lake observes
+# CST/CDT, and that Upsala and Shebandowan observe EST/EDT, all in
+# violation of the official Ontario rules.
+# They also write that Quebec east of the -63 meridian is supposed to
+# observe AST, but residents as far east as Natashquan use EST/EDT,
+# and residents east of Natashquan use AST.
+# We probably need Zones for far east Quebec and for Atikokan,
+# but we don't know when their practices started.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Mont 1917 only - Mar 25 2:00 1:00 D
+Rule Mont 1917 only - Apr 24 0:00 0 S
+Rule Mont 1919 only - Mar 31 2:30 1:00 D
+Rule Mont 1919 only - Oct 25 2:30 0 S
+Rule Mont 1920 only - May 2 2:30 1:00 D
+Rule Mont 1920 1922 - Oct Sun>=1 2:30 0 S
+Rule Mont 1921 only - May 1 2:00 1:00 D
+Rule Mont 1922 only - Apr 30 2:00 1:00 D
+Rule Mont 1924 only - May 17 2:00 1:00 D
+Rule Mont 1924 1926 - Sep lastSun 2:30 0 S
+Rule Mont 1925 1926 - May Sun>=1 2:00 1:00 D
+# The 1927-to-1937 rules can be expressed more simply as
+# Rule Mont 1927 1937 - Apr lastSat 24:00 1:00 D
+# Rule Mont 1927 1937 - Sep lastSat 24:00 0 S
+# The rules below avoid use of 24:00
+# (which pre-1998 versions of zic cannot handle).
+Rule Mont 1927 only - May 1 0:00 1:00 D
+Rule Mont 1927 1932 - Sep lastSun 0:00 0 S
+Rule Mont 1928 1931 - Apr lastSun 0:00 1:00 D
+Rule Mont 1932 only - May 1 0:00 1:00 D
+Rule Mont 1933 1940 - Apr lastSun 0:00 1:00 D
+Rule Mont 1933 only - Oct 1 0:00 0 S
+Rule Mont 1934 1939 - Sep lastSun 0:00 0 S
+Rule Mont 1946 1973 - Apr lastSun 2:00 1:00 D
+Rule Mont 1945 1948 - Sep lastSun 2:00 0 S
+Rule Mont 1949 1950 - Oct lastSun 2:00 0 S
+Rule Mont 1951 1956 - Sep lastSun 2:00 0 S
+Rule Mont 1957 1973 - Oct lastSun 2:00 0 S
+
+Rule Toronto 1919 only - Mar 30 23:30 1:00 D
+Rule Toronto 1919 only - Oct 26 0:00 0 S
+Rule Toronto 1920 only - May 2 2:00 1:00 D
+Rule Toronto 1920 only - Sep 26 0:00 0 S
+Rule Toronto 1921 only - May 15 2:00 1:00 D
+Rule Toronto 1921 only - Sep 15 2:00 0 S
+Rule Toronto 1922 1923 - May Sun>=8 2:00 1:00 D
+# Shanks says 1923-09-19; assume it's a typo and that "-16" was meant.
+Rule Toronto 1922 1926 - Sep Sun>=15 2:00 0 S
+Rule Toronto 1924 1927 - May Sun>=1 2:00 1:00 D
+Rule Toronto 1927 1932 - Sep lastSun 2:00 0 S
+Rule Toronto 1928 1931 - Apr lastSun 2:00 1:00 D
+Rule Toronto 1932 only - May 1 2:00 1:00 D
+Rule Toronto 1933 1940 - Apr lastSun 2:00 1:00 D
+Rule Toronto 1933 only - Oct 1 2:00 0 S
+Rule Toronto 1934 1939 - Sep lastSun 2:00 0 S
+Rule Toronto 1945 1946 - Sep lastSun 2:00 0 S
+Rule Toronto 1946 only - Apr lastSun 2:00 1:00 D
+Rule Toronto 1947 1949 - Apr lastSun 0:00 1:00 D
+Rule Toronto 1947 1948 - Sep lastSun 0:00 0 S
+Rule Toronto 1949 only - Nov lastSun 0:00 0 S
+Rule Toronto 1950 1973 - Apr lastSun 2:00 1:00 D
+Rule Toronto 1950 only - Nov lastSun 2:00 0 S
+Rule Toronto 1951 1956 - Sep lastSun 2:00 0 S
+# Shanks says Toronto ended DST a week early in 1971, namely on 1971-10-24,
+# but Mark Brader wrote (2003-05-31) that he checked the 1971-10-30 issue
+# of the Toronto Star, and it said that DST ended 1971-10-31 as usual.
+Rule Toronto 1957 1973 - Oct lastSun 2:00 0 S
+
+# From Paul Eggert (2003-07-27):
+# Willett (1914-03) writes (p. 17) "In the Cities of Fort William, and
+# Port Arthur, Ontario, the principle of the Bill has been in
+# operation for the past three years, and in the City of Moose Jaw,
+# Saskatchewan, for one year."
+
+# From David Bryan via Tory Tronrud, Director/Curator,
+# Thunder Bay Museum (2003-11-12):
+# There is some suggestion, however, that, by-law or not, daylight
+# savings time was being practiced in Fort William and Port Arthur
+# before 1909.... [I]n 1910, the line between the Eastern and Central
+# Time Zones was permanently moved about two hundred miles west to
+# include the Thunder Bay area.... When Canada adopted daylight
+# savings time in 1916, Fort William and Port Arthur, having done so
+# already, did not change their clocks.... During the Second World
+# War,... [t]he cities agreed to implement DST during the summer
+# months for the remainder of the war years.
+
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Montreal -4:54:16 - LMT 1884
+ -5:00 Mont E%sT 1918
+ -5:00 Canada E%sT 1919
+ -5:00 Mont E%sT 1942 Feb 9 2:00s
+ -5:00 Canada E%sT 1946
+ -5:00 Mont E%sT 1974
+ -5:00 Canada E%sT
+Zone America/Toronto -5:17:32 - LMT 1895
+ -5:00 Canada E%sT 1919
+ -5:00 Toronto E%sT 1942 Feb 9 2:00s
+ -5:00 Canada E%sT 1946
+ -5:00 Toronto E%sT 1974
+ -5:00 Canada E%sT
+Zone America/Thunder_Bay -5:57:00 - LMT 1895
+ -6:00 - CST 1910
+ -5:00 - EST 1942
+ -5:00 Canada E%sT 1970
+ -5:00 Mont E%sT 1973
+ -5:00 - EST 1974
+ -5:00 Canada E%sT
+Zone America/Nipigon -5:53:04 - LMT 1895
+ -5:00 Canada E%sT 1940 Sep 29
+ -5:00 1:00 EDT 1942 Feb 9 2:00s
+ -5:00 Canada E%sT
+Zone America/Rainy_River -6:17:56 - LMT 1895
+ -6:00 Canada C%sT 1940 Sep 29
+ -6:00 1:00 CDT 1942 Feb 9 2:00s
+ -6:00 Canada C%sT
+
+
+# Manitoba
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Winn 1916 only - Apr 23 0:00 1:00 D
+Rule Winn 1916 only - Sep 17 0:00 0 S
+Rule Winn 1918 only - Apr 14 2:00 1:00 D
+Rule Winn 1918 only - Oct 31 2:00 0 S
+Rule Winn 1937 only - May 16 2:00 1:00 D
+Rule Winn 1937 only - Sep 26 2:00 0 S
+Rule Winn 1942 only - Feb 9 2:00 1:00 W # War
+Rule Winn 1945 only - Aug 14 23:00u 1:00 P # Peace
+Rule Winn 1945 only - Sep lastSun 2:00 0 S
+Rule Winn 1946 only - May 12 2:00 1:00 D
+Rule Winn 1946 only - Oct 13 2:00 0 S
+Rule Winn 1947 1949 - Apr lastSun 2:00 1:00 D
+Rule Winn 1947 1949 - Sep lastSun 2:00 0 S
+Rule Winn 1950 only - May 1 2:00 1:00 D
+Rule Winn 1950 only - Sep 30 2:00 0 S
+Rule Winn 1951 1960 - Apr lastSun 2:00 1:00 D
+Rule Winn 1951 1958 - Sep lastSun 2:00 0 S
+Rule Winn 1959 only - Oct lastSun 2:00 0 S
+Rule Winn 1960 only - Sep lastSun 2:00 0 S
+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
+# 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
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Winnipeg -6:28:36 - LMT 1887 Jul 16
+ -6:00 Winn C%sT
+
+
+# Saskatchewan
+
+# From Mark Brader (2003-07-26):
+# The first actual adoption of DST in Canada was at the municipal
+# level. As the [Toronto] Star put it (1912-06-07), "While people
+# elsewhere have long been talking of legislation to save daylight,
+# the city of Moose Jaw [Saskatchewan] has acted on its own hook."
+# DST in Moose Jaw began on Saturday, 1912-06-01 (no time mentioned:
+# presumably late evening, as below), and would run until "the end of
+# the summer". The discrepancy between municipal time and railroad
+# time was noted.
+
+# From Paul Eggert (2003-07-27):
+# Willett (1914-03) notes that DST "has been in operation ... in the
+# City of Moose Jaw, Saskatchewan, for one year."
+
+# From Paul Eggert (2000-10-02):
+# Shanks writes that since 1970 most of this region has been like Regina.
+# Some western towns (e.g. Swift Current) switched from MST/MDT to CST in 1972.
+# Other western towns (e.g. Lloydminster) are like Edmonton.
+# Matthews and Vincent (1998) write that Denare Beach and Creighton
+# are like Winnipeg, in violation of Saskatchewan law.
+
+# 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
+# since you didn't say what you wanted, I didn't bother.
+#
+# Saskatchewan is split by a time zone meridian (105W) and over the years
+# the boundary became pretty ragged as communities near it reevaluated
+# their affiliations in one direction or the other. In 1965 a provincial
+# referendum favoured legislating common time practices.
+#
+# On 15 April 1966 the Time Act (c. T-14, Revised Statutes of
+# Saskatchewan 1978) was proclaimed, and established that the eastern
+# part of Saskatchewan would use CST year round, that districts in
+# northwest Saskatchewan would by default follow CST but could opt to
+# follow Mountain Time rules (thus 1 hour difference in the winter and
+# zero in the summer), and that districts in southwest Saskatchewan would
+# by default follow MT but could opt to follow CST.
+#
+# It took a few years for the dust to settle (I know one story of a town
+# on one time zone having its school in another, such that a mom had to
+# serve her family lunch in two shifts), but presently it seems that only
+# a few towns on the border with Alberta (e.g. Lloydminster) follow MT
+# rules any more; all other districts appear to have used CST year round
+# since sometime in the 1960s.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Regina 1918 only - Apr 14 2:00 1:00 D
+Rule Regina 1918 only - Oct 31 2:00 0 S
+Rule Regina 1930 1934 - May Sun>=1 0:00 1:00 D
+Rule Regina 1930 1934 - Oct Sun>=1 0:00 0 S
+Rule Regina 1937 1941 - Apr Sun>=8 0:00 1:00 D
+Rule Regina 1937 only - Oct Sun>=8 0:00 0 S
+Rule Regina 1938 only - Oct Sun>=1 0:00 0 S
+Rule Regina 1939 1941 - Oct Sun>=8 0:00 0 S
+Rule Regina 1942 only - Feb 9 2:00 1:00 W # War
+Rule Regina 1945 only - Aug 14 23:00u 1:00 P # Peace
+Rule Regina 1945 only - Sep lastSun 2:00 0 S
+Rule Regina 1946 only - Apr Sun>=8 2:00 1:00 D
+Rule Regina 1946 only - Oct Sun>=8 2:00 0 S
+Rule Regina 1947 1957 - Apr lastSun 2:00 1:00 D
+Rule Regina 1947 1957 - Sep lastSun 2:00 0 S
+Rule Regina 1959 only - Apr lastSun 2:00 1:00 D
+Rule Regina 1959 only - Oct lastSun 2:00 0 S
+#
+Rule Swift 1957 only - Apr lastSun 2:00 1:00 D
+Rule Swift 1957 only - Oct lastSun 2:00 0 S
+Rule Swift 1959 1961 - Apr lastSun 2:00 1:00 D
+Rule Swift 1959 only - Oct lastSun 2:00 0 S
+Rule Swift 1960 1961 - Sep lastSun 2:00 0 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Regina -6:58:36 - LMT 1905 Sep
+ -7:00 Regina M%sT 1960 Apr lastSun 2:00
+ -6:00 - CST
+Zone America/Swift_Current -7:11:20 - LMT 1905 Sep
+ -7:00 Canada M%sT 1946 Apr lastSun 2:00
+ -7:00 Regina M%sT 1950
+ -7:00 Swift M%sT 1972 Apr lastSun 2:00
+ -6:00 - CST
+
+
+# Alberta
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Edm 1918 1919 - Apr Sun>=8 2:00 1:00 D
+Rule Edm 1918 only - Oct 31 2:00 0 S
+Rule Edm 1919 only - May 27 2:00 0 S
+Rule Edm 1920 1923 - Apr lastSun 2:00 1:00 D
+Rule Edm 1920 only - Oct lastSun 2:00 0 S
+Rule Edm 1921 1923 - Sep lastSun 2:00 0 S
+Rule Edm 1942 only - Feb 9 2:00 1:00 W # War
+Rule Edm 1945 only - Aug 14 23:00u 1:00 P # Peace
+Rule Edm 1945 only - Sep lastSun 2:00 0 S
+Rule Edm 1947 only - Apr lastSun 2:00 1:00 D
+Rule Edm 1947 only - Sep lastSun 2:00 0 S
+Rule Edm 1967 only - Apr lastSun 2:00 1:00 D
+Rule Edm 1967 only - Oct lastSun 2:00 0 S
+Rule Edm 1969 only - Apr lastSun 2:00 1:00 D
+Rule Edm 1969 only - Oct lastSun 2:00 0 S
+Rule Edm 1972 1986 - Apr lastSun 2:00 1:00 D
+Rule Edm 1972 max - Oct lastSun 2:00 0 S
+Rule Edm 1987 max - Apr Sun>=1 2:00 1:00 D
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Edmonton -7:33:52 - LMT 1906 Sep
+ -7:00 Edm M%sT
+
+
+# British Columbia
+
+# From Paul Eggert (2000-10-02):
+# Shanks writes that since 1970 most of this region has been like Vancouver.
+# Dawson Creek uses MST. Much of east BC is like Edmonton.
+# Matthews and Vincent (1998) write that Creston is like Dawson Creek.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Vanc 1918 only - Apr 14 2:00 1:00 D
+Rule Vanc 1918 only - Oct 31 2:00 0 S
+Rule Vanc 1942 only - Feb 9 2:00 1:00 W # War
+Rule Vanc 1945 only - Aug 14 23:00u 1:00 P # Peace
+Rule Vanc 1945 only - Sep 30 2:00 0 S
+Rule Vanc 1946 1986 - Apr lastSun 2:00 1:00 D
+Rule Vanc 1946 only - Oct 13 2:00 0 S
+Rule Vanc 1947 1961 - Sep lastSun 2:00 0 S
+Rule Vanc 1962 max - Oct lastSun 2:00 0 S
+Rule Vanc 1987 max - Apr Sun>=1 2:00 1:00 D
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Vancouver -8:12:28 - LMT 1884
+ -8:00 Vanc P%sT
+Zone America/Dawson_Creek -8:00:56 - LMT 1884
+ -8:00 Canada P%sT 1947
+ -8:00 Vanc P%sT 1972 Aug 30 2:00
+ -7:00 - MST
+
+
+# Northwest Territories, Nunavut, Yukon
+
+# From Paul Eggert (1999-10-29):
+# Dawson switched to PST in 1973. Inuvik switched to MST in 1979.
+# 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).
+# * C.O. 1973/214 switched Yukon to PST on 1973-10-28 00:00.
+# * O.I.C. 1980/02 established DST.
+# * O.I.C. 1987/056 changed DST to Apr firstSun 2:00 to Oct lastSun 2:00.
+# Shanks says Yukon's 1973-10-28 switch was at 2:00; go with Englander.
+
+# From Rives McDow (1999-09-04):
+# Nunavut ... moved ... to incorporate the whole territory into one time zone.
+# Nunavut moves to single time zone Oct. 31
+#
+#
+# From Antoine Leca (1999-09-06):
+# We then need to create a new timezone for the Kitikmeot region of Nunavut
+# to differentiate it from the Yellowknife region.
+
+# From Paul Eggert (1999-09-20):
+# Basic Facts: The New Territory
+# (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,
+# Pangnirtung wobbled. Here is the result of their wobble:
+#
+# The following businesses and organizations in Pangnirtung use Central Time:
+#
+# First Air, Power Corp, Nunavut Construction, Health Center, RCMP,
+# Eastern Arctic National Parks, A & D Specialist
+#
+# The following businesses and organizations in Pangnirtung use Eastern Time:
+#
+# Hamlet office, All other businesses, Both schools, Airport operator
+#
+# This has made for an interesting situation there, which warranted the news.
+# No one there that I spoke with seems concerned, or has plans to
+# change the local methods of keeping time, as it evidently does not
+# really interfere with any activities or make things difficult locally.
+# They plan to celebrate New Year's turn-over twice, one hour apart,
+# so it appears that the situation will last at least that long.
+# The Nunavut Intergovernmental Affairs hopes that they will "come to
+# their senses", but the locals evidently don't see any problem with
+# the current state of affairs.
+
+# From Michaela Rodrigue, writing in the
+# Nunatsiaq News (1999-11-19):
+# Clyde River, Pangnirtung and Sanikiluaq now operate with two time zones,
+# central - or Nunavut time - for government offices, and eastern time
+# for municipal offices and schools.... Igloolik [was similar but then]
+# made the switch to central time on Saturday, Nov. 6.
+
+# From Paul Eggert (2000-10-02):
+# Matthews and Vincent (1998) say the following, but we lack histories
+# for these potential new Zones.
+#
+# The Canadian Forces station at Alert uses Eastern Time while the
+# handful of residents at the Eureka weather station [in the Central
+# zone] skip daylight savings. Baffin Island, which is crossed by the
+# Central, Eastern and Atlantic Time zones only uses Eastern Time.
+# Gjoa Haven, Taloyoak and Pelly Bay all use Mountain instead of
+# Central Time and Southampton Island [in the Central zone] is not
+# required to use daylight savings.
+
+# From
+# Nunavut now has two time zones
+# (2000-11-10):
+# The Nunavut government would allow its employees in Kugluktuk and
+# Cambridge Bay to operate on central time year-round, putting them
+# one hour behind the rest of Nunavut for six months during the winter.
+# At the end of October the two communities had rebelled against
+# Nunavut's unified time zone, refusing to shift to eastern time with
+# the rest of the territory for the winter. Cambridge Bay remained on
+# central time, while Kugluktuk, even farther west, reverted to
+# mountain time, which they had used before the advent of Nunavut's
+# unified time zone in 1999.
+#
+# From Rives McDow (2001-01-20), quoting the Nunavut government:
+# The preceding decision came into effect at midnight, Saturday Nov 4, 2000.
+
+# From Paul Eggert (2000-12-04):
+# Let's just keep track of the official times for now.
+
+# From Rives McDow (2001-03-07):
+# The premier of Nunavut has issued a ministerial statement advising
+# that effective 2001-04-01, the territory of Nunavut will revert
+# back to three time zones (mountain, central, and eastern). Of the
+# cities in Nunavut, Coral Harbor is the only one that I know of that
+# has said it will not observe dst, staying on EST year round. I'm
+# checking for more info, and will get back to you if I come up with
+# more.
+# [Also see (2001-03-09).]
+
+# 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
+Rule NT_YK 1919 only - May 25 2:00 1:00 D
+Rule NT_YK 1919 only - Nov 1 0:00 0 S
+Rule NT_YK 1942 only - Feb 9 2:00 1:00 W # War
+Rule NT_YK 1945 only - Aug 14 23:00u 1:00 P # Peace
+Rule NT_YK 1945 only - Sep 30 2:00 0 S
+Rule NT_YK 1965 only - Apr lastSun 0:00 2:00 DD
+Rule NT_YK 1965 only - Oct lastSun 2:00 0 S
+Rule NT_YK 1980 1986 - Apr lastSun 2:00 1:00 D
+Rule NT_YK 1980 max - Oct lastSun 2:00 0 S
+Rule NT_YK 1987 max - Apr Sun>=1 2:00 1:00 D
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Pangnirtung -4:22:56 - LMT 1884
+ -4:00 NT_YK A%sT 1995 Apr Sun>=1 2:00
+ -5:00 Canada E%sT 1999 Oct 31 2:00
+ -6:00 Canada C%sT 2000 Oct 29 2:00
+ -5:00 Canada E%sT
+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/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
+ -6:00 Canada C%sT
+Zone America/Cambridge_Bay -7:00:20 - LMT 1884
+ -7:00 NT_YK M%sT 1999 Oct 31 2:00
+ -6:00 Canada C%sT 2000 Oct 29 2:00
+ -5:00 - EST 2000 Nov 5 0:00
+ -6:00 - CST 2001 Apr 1 3:00
+ -7:00 Canada M%sT
+Zone America/Yellowknife -7:37:24 - LMT 1884
+ -7:00 NT_YK M%sT
+Zone America/Inuvik -8:54:00 - LMT 1884
+ -8:00 NT_YK P%sT 1979 Apr lastSun 2:00
+ -7:00 NT_YK M%sT
+Zone America/Whitehorse -9:00:12 - LMT 1900 Aug 20
+ -9:00 NT_YK Y%sT 1966 Jul 1 2:00
+ -8:00 NT_YK P%sT
+Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
+ -9:00 NT_YK Y%sT 1973 Oct 28 0:00
+ -8:00 NT_YK P%sT
+
+
+###############################################################################
+
+# Mexico
+
+# From Paul Eggert (2001-03-05):
+# The Investigation and Analysis Service of the
+# Mexican Library of Congress (MLoC) has published a
+# history of Mexican local time (in Spanish)
+# .
+#
+# Here are the discrepancies between Shanks and the MLoC.
+# (In all cases we go with the MLoC.)
+# 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 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
+# on 1997-10-26 at 02:00.
+
+# From Gwillim Law (2001-02-20):
+# There are some other discrepancies between the Decrees page and the
+# tz database. I think they can best be explained by supposing that
+# the researchers who prepared the Decrees page failed to find some of
+# the relevant documents.
+
+# From Paul Eggert (2000-07-26):
+# 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
(1996-02-15):
+# A guy from our Mexico subsidiary finally found the Presidential Decree
+# outlining the timezone changes in Mexico.
+#
+# ------------- Begin Forwarded Message -------------
+#
+# I finally got my hands on the Official Presidential Decree that sets up the
+# rules for the DST changes. The rules are:
+#
+# 1. The country is divided in 3 timezones:
+# - Baja California Norte (the Mexico/BajaNorte TZ)
+# - Baja California Sur, Nayarit, Sinaloa and Sonora (the Mexico/BajaSur TZ)
+# - The rest of the country (the Mexico/General TZ)
+#
+# 2. From the first Sunday in April at 2:00 AM to the last Sunday in October
+# at 2:00 AM, the times in each zone are as follows:
+# BajaNorte: GMT+7
+# BajaSur: GMT+6
+# General: GMT+5
+#
+# 3. The rest of the year, the times are as follows:
+# BajaNorte: GMT+8
+# BajaSur: GMT+7
+# General: GMT+6
+#
+# The Decree was published in Mexico's Official Newspaper on January 4th.
+#
+# -------------- End Forwarded Message --------------
+# From Paul Eggert (1996-06-12):
+# For an English translation of the decree, see
+# ``Diario Oficial: Time Zone Changeover'' (1996-01-04).
+#
+
+# From Rives McDow (1998-10-08):
+# The State of Quintana Roo has reverted back to central STD and DST times
+# (i.e. UTC -0600 and -0500 as of 1998-08-02).
+
+# From Rives McDow (2000-01-10):
+# Effective April 4, 1999 at 2:00 AM local time, Sonora changed to the time
+# zone 5 hours from the International Date Line, and will not observe daylight
+# savings time so as to stay on the same time zone as the southern part of
+# Arizona year round.
+
+# From Jesper Norgaard, translating
+# (2001-01-17):
+# In Oaxaca, the 55.000 teachers from the Section 22 of the National
+# Syndicate of Education Workers, refuse to apply daylight saving each
+# year, so that the more than 10,000 schools work at normal hour the
+# whole year.
+
+# From Gwillim Law (2001-01-19):
+# ... says
+# (translated):...
+# January 17, 2000 - The Energy Secretary, Ernesto Martens, announced
+# that Summer Time will be reduced from seven to five months, starting
+# this year....
+#
+# [translated], says "summer time will ... take effect on the first Sunday
+# in May, and end on the last Sunday of September.
+
+# From Arthur David Olson (2001-01-25):
+# The 2001-01-24 traditional Washington Post contained the page one
+# story "Timely Issue Divides Mexicans."...
+# http://www.washingtonpost.com/wp-dyn/articles/A37383-2001Jan23.html
+# ... Mexico City Mayor Lopez Obrador "...is threatening to keep
+# Mexico City and its 20 million residents on a different time than
+# the rest of the country..." In particular, Lopez Obrador would abolish
+# observation of Daylight Saving Time.
+
+# Official statute published by the Energy Department
+# (2001-02-01) shows Baja and Chihauhua as still using US DST rules,
+# and Sonora with no DST. This was reported by Jesper Norgaard (2001-02-03).
+
+# From Paul Eggert (2001-03-03):
+#
+# James F. Smith writes in today's LA Times
+#
+# * Sonora will continue to observe standard time.
+# * Last week Mexico City's mayor Andres Manuel Lopez Obrador decreed that
+# the Federal District will not adopt DST.
+# * 4 of 16 district leaders announced they'll ignore the decree.
+# * The decree does not affect federal-controlled facilities including
+# the airport, banks, hospitals, and schools.
+#
+# For now we'll assume that the Federal District will bow to federal rules.
+
+# From Jesper Norgaard (2001-04-01):
+# I found some references to the Mexican application of daylight
+# saving, which modifies what I had already sent you, stating earlier
+# that a number of northern Mexican states would go on daylight
+# saving. The modification reverts this to only cover Baja California
+# (Norte), while all other states (except Sonora, who has no daylight
+# saving all year) will follow the original decree of president
+# Vicente Fox, starting daylight saving May 6, 2001 and ending
+# September 30, 2001.
+# References: "Diario de Monterrey"
+# Palabra (2001-03-31)
+
+# From Reuters (2001-09-04):
+# Mexico's Supreme Court on Tuesday declared that daylight savings was
+# unconstitutional in Mexico City, creating the possibility the
+# capital will be in a different time zone from the rest of the nation
+# next year.... The Supreme Court's ruling takes effect at 2:00
+# a.m. (0800 GMT) on Sept. 30, when Mexico is scheduled to revert to
+# standard time. "This is so residents of the Federal District are not
+# subject to unexpected time changes," a statement from the court said.
+
+# From Jesper Norgaard Welen (2002-03-12):
+# ... consulting my local grocery store(!) and my coworkers, they all insisted
+# that a new decision had been made to reinstate US style DST in Mexico....
+# http://www.conae.gob.mx/ahorro/horaver2001_m1_2002.html (2002-02-20)
+# confirms this. Sonora as usual is the only state where DST is not applied.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Mexico 1939 only - Feb 5 0:00 1:00 D
+Rule Mexico 1939 only - Jun 25 0:00 0 S
+Rule Mexico 1940 only - Dec 9 0:00 1:00 D
+Rule Mexico 1941 only - Apr 1 0:00 0 S
+Rule Mexico 1943 only - Dec 16 0:00 1:00 W # War
+Rule Mexico 1944 only - May 1 0:00 0 S
+Rule Mexico 1950 only - Feb 12 0:00 1:00 D
+Rule Mexico 1950 only - Jul 30 0:00 0 S
+Rule Mexico 1996 2000 - Apr Sun>=1 2:00 1:00 D
+Rule Mexico 1996 2000 - Oct lastSun 2:00 0 S
+Rule Mexico 2001 only - May Sun>=1 2:00 1:00 D
+Rule Mexico 2001 only - Sep lastSun 2:00 0 S
+Rule Mexico 2002 max - Apr Sun>=1 2:00 1:00 D
+Rule Mexico 2002 max - Oct lastSun 2:00 0 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+# Quintana Roo
+Zone America/Cancun -5:47:04 - LMT 1922 Jan 1 0:12:56
+ -6:00 - CST 1981 Dec 23
+ -5:00 Mexico E%sT 1998 Aug 2 2:00
+ -6:00 Mexico C%sT
+# Campeche, Yucatan
+Zone America/Merida -5:58:28 - LMT 1922 Jan 1 0:01:32
+ -6:00 - CST 1981 Dec 23
+ -5:00 - EST 1982 Dec 2
+ -6:00 Mexico C%sT
+# Coahuila, Durango, Nuevo Leon, Tamaulipas
+Zone America/Monterrey -6:41:16 - LMT 1921 Dec 31 23:18:44
+ -6:00 - CST 1988
+ -6:00 US C%sT 1989
+ -6:00 Mexico C%sT
+# Central Mexico
+Zone America/Mexico_City -6:36:36 - LMT 1922 Jan 1 0:23:24
+ -7:00 - MST 1927 Jun 10 23:00
+ -6:00 - CST 1930 Nov 15
+ -7:00 - MST 1931 May 1 23:00
+ -6:00 - CST 1931 Oct
+ -7:00 - MST 1932 Apr 1
+ -6:00 Mexico C%sT 2001 Sep 30 02:00
+ -6:00 - CST 2002 Feb 20
+ -6:00 Mexico C%sT
+# Chihuahua
+Zone America/Chihuahua -7:04:20 - LMT 1921 Dec 31 23:55:40
+ -7:00 - MST 1927 Jun 10 23:00
+ -6:00 - CST 1930 Nov 15
+ -7:00 - MST 1931 May 1 23:00
+ -6:00 - CST 1931 Oct
+ -7:00 - MST 1932 Apr 1
+ -6:00 - CST 1996
+ -6:00 Mexico C%sT 1998
+ -6:00 - CST 1998 Apr Sun>=1 3:00
+ -7:00 Mexico M%sT
+# Sonora
+Zone America/Hermosillo -7:23:52 - LMT 1921 Dec 31 23:36:08
+ -7:00 - MST 1927 Jun 10 23:00
+ -6:00 - CST 1930 Nov 15
+ -7:00 - MST 1931 May 1 23:00
+ -6:00 - CST 1931 Oct
+ -7:00 - MST 1932 Apr 1
+ -6:00 - CST 1942 Apr 24
+ -7:00 - MST 1949 Jan 14
+ -8:00 - PST 1970
+ -7:00 Mexico M%sT 1999
+ -7:00 - MST
+# Baja California Sur, Nayarit, Sinaloa
+Zone America/Mazatlan -7:05:40 - LMT 1921 Dec 31 23:54:20
+ -7:00 - MST 1927 Jun 10 23:00
+ -6:00 - CST 1930 Nov 15
+ -7:00 - MST 1931 May 1 23:00
+ -6:00 - CST 1931 Oct
+ -7:00 - MST 1932 Apr 1
+ -6:00 - CST 1942 Apr 24
+ -7:00 - MST 1949 Jan 14
+ -8:00 - PST 1970
+ -7:00 Mexico M%sT
+# Baja California
+Zone America/Tijuana -7:48:04 - LMT 1922 Jan 1 0:11:56
+ -7:00 - MST 1924
+ -8:00 - PST 1927 Jun 10 23:00
+ -7:00 - MST 1930 Nov 15
+ -8:00 - PST 1931 Apr 1
+ -8:00 1:00 PDT 1931 Sep 30
+ -8:00 - PST 1942 Apr 24
+ -8:00 1:00 PWT 1945 Nov 12
+ -8:00 - PST 1948 Apr 5
+ -8:00 1:00 PDT 1949 Jan 14
+ -8:00 - PST 1954
+ -8:00 CA P%sT 1961
+ -8:00 - PST 1976
+ -8:00 US P%sT 1996
+ -8:00 Mexico P%sT 2001
+ -8:00 US P%sT 2002 Feb 20
+ -8:00 Mexico P%sT
+# From Paul Eggert (2001-03-05):
+# Formerly there was an America/Ensenada zone, which differed from
+# America/Tijuana only in that it did not observe DST from 1976
+# through 1995. This was as per Shanks. However, Guy Harris reports
+# that the 1987 OAG says "Only Ensenada, Mexicale, San Felipe and
+# Tijuana observe DST," which contradicts Shanks but does imply that
+# DST-observance was a town-by-town matter back then. This concerns
+# data after 1970 so most likely there should be at least one Zone
+# other than America/Tijuana for Baja, but it's not clear yet what its
+# name or contents should be.
+#
+# Revillagigedo Is
+# no information
+
+###############################################################################
+
+# Anguilla
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Anguilla -4:12:16 - LMT 1912 Mar 2
+ -4:00 - AST
+
+# Antigua and Barbuda
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Antigua -4:07:12 - LMT 1912 Mar 2
+ -5:00 - EST 1951
+ -4:00 - AST
+
+# Bahamas
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Bahamas 1964 max - Oct lastSun 2:00 0 S
+Rule Bahamas 1964 1986 - Apr lastSun 2:00 1:00 D
+Rule Bahamas 1987 max - Apr Sun>=1 2:00 1:00 D
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Nassau -5:09:24 - LMT 1912 Mar 2
+ -5:00 Bahamas E%sT
+
+# Barbados
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Barb 1977 only - Jun 12 2:00 1:00 D
+Rule Barb 1977 1978 - Oct Sun>=1 2:00 0 S
+Rule Barb 1978 1980 - Apr Sun>=15 2:00 1:00 D
+Rule Barb 1979 only - Sep 30 2:00 0 S
+Rule Barb 1980 only - Sep 25 2:00 0 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Barbados -3:58:28 - LMT 1924 # Bridgetown
+ -3:58:28 - BMT 1932 # Bridgetown Mean Time
+ -4:00 Barb A%sT
+
+# Belize
+# Whitman entirely disagrees with Shanks; go with Shanks.
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Belize 1918 1942 - Oct Sun>=2 0:00 0:30 HD
+Rule Belize 1919 1943 - Feb Sun>=9 0:00 0 S
+Rule Belize 1973 only - Dec 5 0:00 1:00 D
+Rule Belize 1974 only - Feb 9 0:00 0 S
+Rule Belize 1982 only - Dec 18 0:00 1:00 D
+Rule Belize 1983 only - Feb 12 0:00 0 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Belize -5:52:48 - LMT 1912 Apr
+ -6:00 Belize C%sT
+
+# Bermuda
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone Atlantic/Bermuda -4:19:04 - LMT 1930 Jan 1 2:00 # Hamilton
+ -4:00 - AST 1974 Apr 28 2:00
+ -4:00 Bahamas A%sT
+
+# Cayman Is
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown
+ -5:07:12 - KMT 1912 Feb # Kingston Mean Time
+ -5:00 - EST
+
+# Costa Rica
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule CR 1979 1980 - Feb lastSun 0:00 1:00 D
+Rule CR 1979 1980 - Jun Sun>=1 0:00 0 S
+Rule CR 1991 1992 - Jan Sat>=15 0:00 1:00 D
+# IATA SSIM (1991-09) says the following was at 1:00; go with Shanks.
+Rule CR 1991 only - Jul 1 0:00 0 S
+Rule CR 1992 only - Mar 15 0:00 0 S
+# There are too many San Joses elsewhere, so we'll use `Costa Rica'.
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Costa_Rica -5:36:20 - LMT 1890 # San Jose
+ -5:36:20 - SJMT 1921 Jan 15 # San Jose Mean Time
+ -6:00 CR C%sT
+# Coco
+# no information; probably like America/Costa_Rica
+
+# Cuba
+
+# From Arthur David Olson (1999-03-29):
+# The 1999-03-28 exhibition baseball game held in Havana, Cuba, between
+# the Cuban National Team and the Baltimore Orioles was carried live on
+# the Orioles Radio Network, including affiliate WTOP in Washington, DC.
+# During the game, play-by-play announcer Jim Hunter noted that
+# "We'll be losing two hours of sleep...Cuba switched to Daylight Saving
+# Time today." (The "two hour" remark referred to losing one hour of
+# sleep on 1999-03-28--when the announcers were in Cuba as it switched
+# to DST--and one more hour on 1999-04-04--when the announcers will have
+# returned to Baltimore, which switches on that date.)
+
+# 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
+Rule Cuba 1940 1942 - Jun Sun>=1 0:00 1:00 D
+Rule Cuba 1940 1942 - Sep Sun>=1 0:00 0 S
+Rule Cuba 1945 1946 - Jun Sun>=1 0:00 1:00 D
+Rule Cuba 1945 1946 - Sep Sun>=1 0:00 0 S
+Rule Cuba 1965 only - Jun 1 0:00 1:00 D
+Rule Cuba 1965 only - Sep 30 0:00 0 S
+Rule Cuba 1966 only - May 29 0:00 1:00 D
+Rule Cuba 1966 only - Oct 2 0:00 0 S
+Rule Cuba 1967 only - Apr 8 0:00 1:00 D
+Rule Cuba 1967 1968 - Sep Sun>=8 0:00 0 S
+Rule Cuba 1968 only - Apr 14 0:00 1:00 D
+Rule Cuba 1969 1977 - Apr lastSun 0:00 1:00 D
+Rule Cuba 1969 1971 - Oct lastSun 0:00 0 S
+Rule Cuba 1972 1974 - Oct 8 0:00 0 S
+Rule Cuba 1975 1977 - Oct lastSun 0:00 0 S
+Rule Cuba 1978 only - May 7 0:00 1:00 D
+Rule Cuba 1978 1990 - Oct Sun>=8 0:00 0 S
+Rule Cuba 1979 1980 - Mar Sun>=15 0:00 1:00 D
+Rule Cuba 1981 1985 - May Sun>=5 0:00 1:00 D
+Rule Cuba 1986 1989 - Mar Sun>=14 0:00 1:00 D
+Rule Cuba 1990 1997 - Apr Sun>=1 0:00 1:00 D
+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 2000 max - Apr Sun>=1 0:00s 1:00 D
+
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Havana -5:29:28 - LMT 1890
+ -5:29:36 - HMT 1925 Jul 19 12:00 # Havana MT
+ -5:00 Cuba C%sT
+
+# Dominica
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Dominica -4:05:36 - LMT 1911 Jul 1 0:01 # Roseau
+ -4:00 - AST
+
+# Dominican Republic
+
+# From Steffen Thorsen (2000-10-30):
+# Enrique Morales reported to me that the Dominican Republic has changed the
+# time zone to Eastern Standard Time as of Sunday 29 at 2 am....
+# http://www.listin.com.do/antes/261000/republica/princi.html
+
+# From Paul Eggert (2000-12-04):
+# That URL (2000-10-26, in Spanish) says they planned to use US-style DST.
+
+# From Rives McDow (2000-12-01):
+# Dominican Republic changed its mind and presidential decree on Tuesday,
+# November 28, 2000, with a new decree. On Sunday, December 3 at 1:00 AM the
+# Dominican Republic will be reverting to 8 hours from the International Date
+# Line, and will not be using DST in the foreseeable future. The reason they
+# decided to use DST was to be in synch with Puerto Rico, who was also going
+# to implement DST. When Puerto Rico didn't implement DST, the president
+# decided to revert.
+
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule DR 1966 only - Oct 30 0:00 1:00 D
+Rule DR 1967 only - Feb 28 0:00 0 S
+Rule DR 1969 1973 - Oct lastSun 0:00 0:30 HD
+Rule DR 1970 only - Feb 21 0:00 0 S
+Rule DR 1971 only - Jan 20 0:00 0 S
+Rule DR 1972 1974 - Jan 21 0:00 0 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Santo_Domingo -4:39:36 - LMT 1890
+ -4:40 - SDMT 1933 Apr 1 12:00 # S. Dom. MT
+ -5:00 DR E%sT 1974 Oct 27
+ -4:00 - AST 2000 Oct 29 02:00
+ -5:00 US E%sT 2000 Dec 3 01:00
+ -4:00 - AST
+
+# El Salvador
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Salv 1987 1988 - May Sun>=1 0:00 1:00 D
+Rule Salv 1987 1988 - Sep lastSun 0:00 0 S
+# There are too many San Salvadors elsewhere, so use America/El_Salvador
+# instead of America/San_Salvador.
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/El_Salvador -5:56:48 - LMT 1921 # San Salvador
+ -6:00 Salv C%sT
+
+# Grenada
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Grenada -4:07:00 - LMT 1911 Jul # St George's
+ -4:00 - AST
+
+# Guadeloupe
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Guadeloupe -4:06:08 - LMT 1911 Jun 8 # Pointe a Pitre
+ -4:00 - AST
+
+# Guatemala
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Guat 1973 only - Nov 25 0:00 1:00 D
+Rule Guat 1974 only - Feb 24 0:00 0 S
+Rule Guat 1983 only - May 21 0:00 1:00 D
+Rule Guat 1983 only - Sep 22 0:00 0 S
+Rule Guat 1991 only - Mar 23 0:00 1:00 D
+Rule Guat 1991 only - Sep 7 0:00 0 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Guatemala -6:02:04 - LMT 1918 Oct 5
+ -6:00 Guat C%sT
+
+# Haiti
+# 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
+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
+# 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
+ -5:00 Haiti E%sT
+
+# Honduras
+# Shanks says 1921 Jan 1; go with Whitman's more precise Apr 1.
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Tegucigalpa -5:48:52 - LMT 1921 Apr
+ -6:00 Salv C%sT
+#
+# Great Swan I ceded by US to Honduras in 1972
+
+# Jamaica
+
+# From Bob Devine (1988-01-28):
+# Follows US rules.
+
+# From U. S. Naval Observatory (1989-01-19):
+# JAMAICA 5 H BEHIND UTC
+
+# From Shanks:
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Jamaica -5:07:12 - LMT 1890 # Kingston
+ -5:07:12 - KMT 1912 Feb # Kingston Mean Time
+ -5:00 - EST 1974 Apr 28 2:00
+ -5:00 US E%sT 1984
+ -5:00 - EST
+
+# Martinique
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Martinique -4:04:20 - LMT 1890 # Fort-de-France
+ -4:04:20 - FFMT 1911 May # Fort-de-France MT
+ -4:00 - AST 1980 Apr 6
+ -4:00 1:00 ADT 1980 Sep 28
+ -4:00 - AST
+
+# Montserrat
+# From Paul Eggert (1997-08-31):
+# Recent volcanic eruptions have forced evacuation of Plymouth, the capital.
+# Luckily, Olveston, the current de facto capital, has the same longitude.
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Montserrat -4:08:52 - LMT 1911 Jul 1 0:01 # Olveston
+ -4:00 - AST
+
+# Nicaragua
+#
+# From Steffen Thorsen (1998-12-29):
+# Nicaragua seems to be back at -6:00 but I have not been able to find when
+# they changed from -5:00.
+#
+# 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 - Sep 24 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?
+ -6:00 - CST 1973 May
+ -5:00 - EST 1975 Feb 16
+ -6:00 Nic C%sT 1993 Jan 1 4:00
+ -5:00 - EST 1998 Dec
+ -6:00 - CST
+
+# Panama
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Panama -5:18:08 - LMT 1890
+ -5:19:36 - CMT 1908 Apr 22 # Colon Mean Time
+ -5:00 - EST
+
+# Puerto Rico
+# There are too many San Juans elsewhere, so we'll use `Puerto_Rico'.
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Puerto_Rico -4:24:25 - LMT 1899 Mar 28 12:00 # San Juan
+ -4:00 - AST 1942 May 3
+ -4:00 1:00 AWT 1945 Sep 30 2:00
+ -4:00 - AST
+
+# St Kitts-Nevis
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/St_Kitts -4:10:52 - LMT 1912 Mar 2 # Basseterre
+ -4:00 - AST
+
+# St Lucia
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/St_Lucia -4:04:00 - LMT 1890 # Castries
+ -4:04:00 - CMT 1912 # Castries Mean Time
+ -4:00 - AST
+
+# St Pierre and Miquelon
+# There are too many St Pierres elsewhere, so we'll use `Miquelon'.
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre
+ -4:00 - AST 1980 May
+ -3:00 - PMST 1987 # Pierre & Miquelon Time
+ -3:00 Canada PM%sT
+
+# St Vincent and the Grenadines
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/St_Vincent -4:04:56 - LMT 1890 # Kingstown
+ -4:04:56 - KMT 1912 # Kingstown Mean Time
+ -4:00 - AST
+
+# Turks and Caicos
+# From Paul Eggert (1998-08-06):
+# Shanks says they use US DST rules, but IATA SSIM (1991/1998)
+# says they switch at midnight. Go with IATA SSIM.
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule TC 1979 1986 - Apr lastSun 0:00 1:00 D
+Rule TC 1979 max - Oct lastSun 0:00 0 S
+Rule TC 1987 max - Apr Sun>=1 0:00 1:00 D
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Grand_Turk -4:44:32 - LMT 1890
+ -5:07:12 - KMT 1912 Feb # Kingston Mean Time
+ -5:00 TC E%sT
+
+# British Virgin Is
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Tortola -4:18:28 - LMT 1911 Jul # Road Town
+ -4:00 - AST
+
+# Virgin Is
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/St_Thomas -4:19:44 - LMT 1911 Jul # Charlotte Amalie
+ -4:00 - AST
--- /dev/null
+# @(#)pacificnew 7.10
+
+# From Arthur David Olson (1989-04-05):
+# On 1989-04-05, the U. S. House of Representatives passed (238-154) a bill
+# establishing "Pacific Presidential Election Time"; it was not acted on
+# by the Senate or signed into law by the President.
+# You might want to change the "PE" (Presidential Election) below to
+# "Q" (Quadrennial) to maintain three-character zone abbreviations.
+# If you're really conservative, you might want to change it to "D".
+# Avoid "L" (Leap Year), which won't be true in 2100.
+
+# If Presidential Election Time is ever established, replace "XXXX" below
+# with the year the law takes effect and uncomment the "##" lines.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+## Rule Twilite XXXX max - Apr Sun>=1 2:00 1:00 D
+## Rule Twilite XXXX max uspres Oct lastSun 2:00 1:00 PE
+## Rule Twilite XXXX max uspres Nov Sun>=7 2:00 0 S
+## Rule Twilite XXXX max nonpres Oct lastSun 2:00 0 S
+
+# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
+## Zone America/Los_Angeles-PET -8:00 US P%sT XXXX
+## -8:00 Twilite P%sT
+
+# For now...
+Link America/Los_Angeles US/Pacific-New ##
--- /dev/null
+# @(#)solar87 7.3
+
+# So much for footnotes about Saudi Arabia.
+# Apparent noon times below are for Riyadh; your mileage will vary.
+# Times were computed using formulas in the U.S. Naval Observatory's
+# Almanac for Computers 1987; the formulas "will give EqT to an accuracy of
+# [plus or minus two] seconds during the current year."
+#
+# Rounding to the nearest five seconds results in fewer than
+# 256 different "time types"--a limit that's faced because time types are
+# stored on disk as unsigned chars.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule sol87 1987 only - Jan 1 12:03:20s -0:03:20 -
+Rule sol87 1987 only - Jan 2 12:03:50s -0:03:50 -
+Rule sol87 1987 only - Jan 3 12:04:15s -0:04:15 -
+Rule sol87 1987 only - Jan 4 12:04:45s -0:04:45 -
+Rule sol87 1987 only - Jan 5 12:05:10s -0:05:10 -
+Rule sol87 1987 only - Jan 6 12:05:40s -0:05:40 -
+Rule sol87 1987 only - Jan 7 12:06:05s -0:06:05 -
+Rule sol87 1987 only - Jan 8 12:06:30s -0:06:30 -
+Rule sol87 1987 only - Jan 9 12:06:55s -0:06:55 -
+Rule sol87 1987 only - Jan 10 12:07:20s -0:07:20 -
+Rule sol87 1987 only - Jan 11 12:07:45s -0:07:45 -
+Rule sol87 1987 only - Jan 12 12:08:10s -0:08:10 -
+Rule sol87 1987 only - Jan 13 12:08:30s -0:08:30 -
+Rule sol87 1987 only - Jan 14 12:08:55s -0:08:55 -
+Rule sol87 1987 only - Jan 15 12:09:15s -0:09:15 -
+Rule sol87 1987 only - Jan 16 12:09:35s -0:09:35 -
+Rule sol87 1987 only - Jan 17 12:09:55s -0:09:55 -
+Rule sol87 1987 only - Jan 18 12:10:15s -0:10:15 -
+Rule sol87 1987 only - Jan 19 12:10:35s -0:10:35 -
+Rule sol87 1987 only - Jan 20 12:10:55s -0:10:55 -
+Rule sol87 1987 only - Jan 21 12:11:10s -0:11:10 -
+Rule sol87 1987 only - Jan 22 12:11:30s -0:11:30 -
+Rule sol87 1987 only - Jan 23 12:11:45s -0:11:45 -
+Rule sol87 1987 only - Jan 24 12:12:00s -0:12:00 -
+Rule sol87 1987 only - Jan 25 12:12:15s -0:12:15 -
+Rule sol87 1987 only - Jan 26 12:12:30s -0:12:30 -
+Rule sol87 1987 only - Jan 27 12:12:40s -0:12:40 -
+Rule sol87 1987 only - Jan 28 12:12:55s -0:12:55 -
+Rule sol87 1987 only - Jan 29 12:13:05s -0:13:05 -
+Rule sol87 1987 only - Jan 30 12:13:15s -0:13:15 -
+Rule sol87 1987 only - Jan 31 12:13:25s -0:13:25 -
+Rule sol87 1987 only - Feb 1 12:13:35s -0:13:35 -
+Rule sol87 1987 only - Feb 2 12:13:40s -0:13:40 -
+Rule sol87 1987 only - Feb 3 12:13:50s -0:13:50 -
+Rule sol87 1987 only - Feb 4 12:13:55s -0:13:55 -
+Rule sol87 1987 only - Feb 5 12:14:00s -0:14:00 -
+Rule sol87 1987 only - Feb 6 12:14:05s -0:14:05 -
+Rule sol87 1987 only - Feb 7 12:14:10s -0:14:10 -
+Rule sol87 1987 only - Feb 8 12:14:10s -0:14:10 -
+Rule sol87 1987 only - Feb 9 12:14:15s -0:14:15 -
+Rule sol87 1987 only - Feb 10 12:14:15s -0:14:15 -
+Rule sol87 1987 only - Feb 11 12:14:15s -0:14:15 -
+Rule sol87 1987 only - Feb 12 12:14:15s -0:14:15 -
+Rule sol87 1987 only - Feb 13 12:14:15s -0:14:15 -
+Rule sol87 1987 only - Feb 14 12:14:15s -0:14:15 -
+Rule sol87 1987 only - Feb 15 12:14:10s -0:14:10 -
+Rule sol87 1987 only - Feb 16 12:14:10s -0:14:10 -
+Rule sol87 1987 only - Feb 17 12:14:05s -0:14:05 -
+Rule sol87 1987 only - Feb 18 12:14:00s -0:14:00 -
+Rule sol87 1987 only - Feb 19 12:13:55s -0:13:55 -
+Rule sol87 1987 only - Feb 20 12:13:50s -0:13:50 -
+Rule sol87 1987 only - Feb 21 12:13:45s -0:13:45 -
+Rule sol87 1987 only - Feb 22 12:13:35s -0:13:35 -
+Rule sol87 1987 only - Feb 23 12:13:30s -0:13:30 -
+Rule sol87 1987 only - Feb 24 12:13:20s -0:13:20 -
+Rule sol87 1987 only - Feb 25 12:13:10s -0:13:10 -
+Rule sol87 1987 only - Feb 26 12:13:00s -0:13:00 -
+Rule sol87 1987 only - Feb 27 12:12:50s -0:12:50 -
+Rule sol87 1987 only - Feb 28 12:12:40s -0:12:40 -
+Rule sol87 1987 only - Mar 1 12:12:30s -0:12:30 -
+Rule sol87 1987 only - Mar 2 12:12:20s -0:12:20 -
+Rule sol87 1987 only - Mar 3 12:12:05s -0:12:05 -
+Rule sol87 1987 only - Mar 4 12:11:55s -0:11:55 -
+Rule sol87 1987 only - Mar 5 12:11:40s -0:11:40 -
+Rule sol87 1987 only - Mar 6 12:11:25s -0:11:25 -
+Rule sol87 1987 only - Mar 7 12:11:15s -0:11:15 -
+Rule sol87 1987 only - Mar 8 12:11:00s -0:11:00 -
+Rule sol87 1987 only - Mar 9 12:10:45s -0:10:45 -
+Rule sol87 1987 only - Mar 10 12:10:30s -0:10:30 -
+Rule sol87 1987 only - Mar 11 12:10:15s -0:10:15 -
+Rule sol87 1987 only - Mar 12 12:09:55s -0:09:55 -
+Rule sol87 1987 only - Mar 13 12:09:40s -0:09:40 -
+Rule sol87 1987 only - Mar 14 12:09:25s -0:09:25 -
+Rule sol87 1987 only - Mar 15 12:09:10s -0:09:10 -
+Rule sol87 1987 only - Mar 16 12:08:50s -0:08:50 -
+Rule sol87 1987 only - Mar 17 12:08:35s -0:08:35 -
+Rule sol87 1987 only - Mar 18 12:08:15s -0:08:15 -
+Rule sol87 1987 only - Mar 19 12:08:00s -0:08:00 -
+Rule sol87 1987 only - Mar 20 12:07:40s -0:07:40 -
+Rule sol87 1987 only - Mar 21 12:07:25s -0:07:25 -
+Rule sol87 1987 only - Mar 22 12:07:05s -0:07:05 -
+Rule sol87 1987 only - Mar 23 12:06:50s -0:06:50 -
+Rule sol87 1987 only - Mar 24 12:06:30s -0:06:30 -
+Rule sol87 1987 only - Mar 25 12:06:10s -0:06:10 -
+Rule sol87 1987 only - Mar 26 12:05:55s -0:05:55 -
+Rule sol87 1987 only - Mar 27 12:05:35s -0:05:35 -
+Rule sol87 1987 only - Mar 28 12:05:15s -0:05:15 -
+Rule sol87 1987 only - Mar 29 12:05:00s -0:05:00 -
+Rule sol87 1987 only - Mar 30 12:04:40s -0:04:40 -
+Rule sol87 1987 only - Mar 31 12:04:25s -0:04:25 -
+Rule sol87 1987 only - Apr 1 12:04:05s -0:04:05 -
+Rule sol87 1987 only - Apr 2 12:03:45s -0:03:45 -
+Rule sol87 1987 only - Apr 3 12:03:30s -0:03:30 -
+Rule sol87 1987 only - Apr 4 12:03:10s -0:03:10 -
+Rule sol87 1987 only - Apr 5 12:02:55s -0:02:55 -
+Rule sol87 1987 only - Apr 6 12:02:35s -0:02:35 -
+Rule sol87 1987 only - Apr 7 12:02:20s -0:02:20 -
+Rule sol87 1987 only - Apr 8 12:02:05s -0:02:05 -
+Rule sol87 1987 only - Apr 9 12:01:45s -0:01:45 -
+Rule sol87 1987 only - Apr 10 12:01:30s -0:01:30 -
+Rule sol87 1987 only - Apr 11 12:01:15s -0:01:15 -
+Rule sol87 1987 only - Apr 12 12:00:55s -0:00:55 -
+Rule sol87 1987 only - Apr 13 12:00:40s -0:00:40 -
+Rule sol87 1987 only - Apr 14 12:00:25s -0:00:25 -
+Rule sol87 1987 only - Apr 15 12:00:10s -0:00:10 -
+Rule sol87 1987 only - Apr 16 11:59:55s 0:00:05 -
+Rule sol87 1987 only - Apr 17 11:59:45s 0:00:15 -
+Rule sol87 1987 only - Apr 18 11:59:30s 0:00:30 -
+Rule sol87 1987 only - Apr 19 11:59:15s 0:00:45 -
+Rule sol87 1987 only - Apr 20 11:59:05s 0:00:55 -
+Rule sol87 1987 only - Apr 21 11:58:50s 0:01:10 -
+Rule sol87 1987 only - Apr 22 11:58:40s 0:01:20 -
+Rule sol87 1987 only - Apr 23 11:58:25s 0:01:35 -
+Rule sol87 1987 only - Apr 24 11:58:15s 0:01:45 -
+Rule sol87 1987 only - Apr 25 11:58:05s 0:01:55 -
+Rule sol87 1987 only - Apr 26 11:57:55s 0:02:05 -
+Rule sol87 1987 only - Apr 27 11:57:45s 0:02:15 -
+Rule sol87 1987 only - Apr 28 11:57:35s 0:02:25 -
+Rule sol87 1987 only - Apr 29 11:57:25s 0:02:35 -
+Rule sol87 1987 only - Apr 30 11:57:15s 0:02:45 -
+Rule sol87 1987 only - May 1 11:57:10s 0:02:50 -
+Rule sol87 1987 only - May 2 11:57:00s 0:03:00 -
+Rule sol87 1987 only - May 3 11:56:55s 0:03:05 -
+Rule sol87 1987 only - May 4 11:56:50s 0:03:10 -
+Rule sol87 1987 only - May 5 11:56:45s 0:03:15 -
+Rule sol87 1987 only - May 6 11:56:40s 0:03:20 -
+Rule sol87 1987 only - May 7 11:56:35s 0:03:25 -
+Rule sol87 1987 only - May 8 11:56:30s 0:03:30 -
+Rule sol87 1987 only - May 9 11:56:25s 0:03:35 -
+Rule sol87 1987 only - May 10 11:56:25s 0:03:35 -
+Rule sol87 1987 only - May 11 11:56:20s 0:03:40 -
+Rule sol87 1987 only - May 12 11:56:20s 0:03:40 -
+Rule sol87 1987 only - May 13 11:56:20s 0:03:40 -
+Rule sol87 1987 only - May 14 11:56:20s 0:03:40 -
+Rule sol87 1987 only - May 15 11:56:20s 0:03:40 -
+Rule sol87 1987 only - May 16 11:56:20s 0:03:40 -
+Rule sol87 1987 only - May 17 11:56:20s 0:03:40 -
+Rule sol87 1987 only - May 18 11:56:20s 0:03:40 -
+Rule sol87 1987 only - May 19 11:56:25s 0:03:35 -
+Rule sol87 1987 only - May 20 11:56:25s 0:03:35 -
+Rule sol87 1987 only - May 21 11:56:30s 0:03:30 -
+Rule sol87 1987 only - May 22 11:56:35s 0:03:25 -
+Rule sol87 1987 only - May 23 11:56:40s 0:03:20 -
+Rule sol87 1987 only - May 24 11:56:45s 0:03:15 -
+Rule sol87 1987 only - May 25 11:56:50s 0:03:10 -
+Rule sol87 1987 only - May 26 11:56:55s 0:03:05 -
+Rule sol87 1987 only - May 27 11:57:00s 0:03:00 -
+Rule sol87 1987 only - May 28 11:57:10s 0:02:50 -
+Rule sol87 1987 only - May 29 11:57:15s 0:02:45 -
+Rule sol87 1987 only - May 30 11:57:25s 0:02:35 -
+Rule sol87 1987 only - May 31 11:57:30s 0:02:30 -
+Rule sol87 1987 only - Jun 1 11:57:40s 0:02:20 -
+Rule sol87 1987 only - Jun 2 11:57:50s 0:02:10 -
+Rule sol87 1987 only - Jun 3 11:58:00s 0:02:00 -
+Rule sol87 1987 only - Jun 4 11:58:10s 0:01:50 -
+Rule sol87 1987 only - Jun 5 11:58:20s 0:01:40 -
+Rule sol87 1987 only - Jun 6 11:58:30s 0:01:30 -
+Rule sol87 1987 only - Jun 7 11:58:40s 0:01:20 -
+Rule sol87 1987 only - Jun 8 11:58:50s 0:01:10 -
+Rule sol87 1987 only - Jun 9 11:59:05s 0:00:55 -
+Rule sol87 1987 only - Jun 10 11:59:15s 0:00:45 -
+Rule sol87 1987 only - Jun 11 11:59:30s 0:00:30 -
+Rule sol87 1987 only - Jun 12 11:59:40s 0:00:20 -
+Rule sol87 1987 only - Jun 13 11:59:50s 0:00:10 -
+Rule sol87 1987 only - Jun 14 12:00:05s -0:00:05 -
+Rule sol87 1987 only - Jun 15 12:00:15s -0:00:15 -
+Rule sol87 1987 only - Jun 16 12:00:30s -0:00:30 -
+Rule sol87 1987 only - Jun 17 12:00:45s -0:00:45 -
+Rule sol87 1987 only - Jun 18 12:00:55s -0:00:55 -
+Rule sol87 1987 only - Jun 19 12:01:10s -0:01:10 -
+Rule sol87 1987 only - Jun 20 12:01:20s -0:01:20 -
+Rule sol87 1987 only - Jun 21 12:01:35s -0:01:35 -
+Rule sol87 1987 only - Jun 22 12:01:50s -0:01:50 -
+Rule sol87 1987 only - Jun 23 12:02:00s -0:02:00 -
+Rule sol87 1987 only - Jun 24 12:02:15s -0:02:15 -
+Rule sol87 1987 only - Jun 25 12:02:25s -0:02:25 -
+Rule sol87 1987 only - Jun 26 12:02:40s -0:02:40 -
+Rule sol87 1987 only - Jun 27 12:02:50s -0:02:50 -
+Rule sol87 1987 only - Jun 28 12:03:05s -0:03:05 -
+Rule sol87 1987 only - Jun 29 12:03:15s -0:03:15 -
+Rule sol87 1987 only - Jun 30 12:03:30s -0:03:30 -
+Rule sol87 1987 only - Jul 1 12:03:40s -0:03:40 -
+Rule sol87 1987 only - Jul 2 12:03:50s -0:03:50 -
+Rule sol87 1987 only - Jul 3 12:04:05s -0:04:05 -
+Rule sol87 1987 only - Jul 4 12:04:15s -0:04:15 -
+Rule sol87 1987 only - Jul 5 12:04:25s -0:04:25 -
+Rule sol87 1987 only - Jul 6 12:04:35s -0:04:35 -
+Rule sol87 1987 only - Jul 7 12:04:45s -0:04:45 -
+Rule sol87 1987 only - Jul 8 12:04:55s -0:04:55 -
+Rule sol87 1987 only - Jul 9 12:05:05s -0:05:05 -
+Rule sol87 1987 only - Jul 10 12:05:15s -0:05:15 -
+Rule sol87 1987 only - Jul 11 12:05:20s -0:05:20 -
+Rule sol87 1987 only - Jul 12 12:05:30s -0:05:30 -
+Rule sol87 1987 only - Jul 13 12:05:40s -0:05:40 -
+Rule sol87 1987 only - Jul 14 12:05:45s -0:05:45 -
+Rule sol87 1987 only - Jul 15 12:05:50s -0:05:50 -
+Rule sol87 1987 only - Jul 16 12:06:00s -0:06:00 -
+Rule sol87 1987 only - Jul 17 12:06:05s -0:06:05 -
+Rule sol87 1987 only - Jul 18 12:06:10s -0:06:10 -
+Rule sol87 1987 only - Jul 19 12:06:15s -0:06:15 -
+Rule sol87 1987 only - Jul 20 12:06:15s -0:06:15 -
+Rule sol87 1987 only - Jul 21 12:06:20s -0:06:20 -
+Rule sol87 1987 only - Jul 22 12:06:25s -0:06:25 -
+Rule sol87 1987 only - Jul 23 12:06:25s -0:06:25 -
+Rule sol87 1987 only - Jul 24 12:06:25s -0:06:25 -
+Rule sol87 1987 only - Jul 25 12:06:30s -0:06:30 -
+Rule sol87 1987 only - Jul 26 12:06:30s -0:06:30 -
+Rule sol87 1987 only - Jul 27 12:06:30s -0:06:30 -
+Rule sol87 1987 only - Jul 28 12:06:30s -0:06:30 -
+Rule sol87 1987 only - Jul 29 12:06:25s -0:06:25 -
+Rule sol87 1987 only - Jul 30 12:06:25s -0:06:25 -
+Rule sol87 1987 only - Jul 31 12:06:25s -0:06:25 -
+Rule sol87 1987 only - Aug 1 12:06:20s -0:06:20 -
+Rule sol87 1987 only - Aug 2 12:06:15s -0:06:15 -
+Rule sol87 1987 only - Aug 3 12:06:10s -0:06:10 -
+Rule sol87 1987 only - Aug 4 12:06:05s -0:06:05 -
+Rule sol87 1987 only - Aug 5 12:06:00s -0:06:00 -
+Rule sol87 1987 only - Aug 6 12:05:55s -0:05:55 -
+Rule sol87 1987 only - Aug 7 12:05:50s -0:05:50 -
+Rule sol87 1987 only - Aug 8 12:05:40s -0:05:40 -
+Rule sol87 1987 only - Aug 9 12:05:35s -0:05:35 -
+Rule sol87 1987 only - Aug 10 12:05:25s -0:05:25 -
+Rule sol87 1987 only - Aug 11 12:05:15s -0:05:15 -
+Rule sol87 1987 only - Aug 12 12:05:05s -0:05:05 -
+Rule sol87 1987 only - Aug 13 12:04:55s -0:04:55 -
+Rule sol87 1987 only - Aug 14 12:04:45s -0:04:45 -
+Rule sol87 1987 only - Aug 15 12:04:35s -0:04:35 -
+Rule sol87 1987 only - Aug 16 12:04:25s -0:04:25 -
+Rule sol87 1987 only - Aug 17 12:04:10s -0:04:10 -
+Rule sol87 1987 only - Aug 18 12:04:00s -0:04:00 -
+Rule sol87 1987 only - Aug 19 12:03:45s -0:03:45 -
+Rule sol87 1987 only - Aug 20 12:03:30s -0:03:30 -
+Rule sol87 1987 only - Aug 21 12:03:15s -0:03:15 -
+Rule sol87 1987 only - Aug 22 12:03:00s -0:03:00 -
+Rule sol87 1987 only - Aug 23 12:02:45s -0:02:45 -
+Rule sol87 1987 only - Aug 24 12:02:30s -0:02:30 -
+Rule sol87 1987 only - Aug 25 12:02:15s -0:02:15 -
+Rule sol87 1987 only - Aug 26 12:02:00s -0:02:00 -
+Rule sol87 1987 only - Aug 27 12:01:40s -0:01:40 -
+Rule sol87 1987 only - Aug 28 12:01:25s -0:01:25 -
+Rule sol87 1987 only - Aug 29 12:01:05s -0:01:05 -
+Rule sol87 1987 only - Aug 30 12:00:50s -0:00:50 -
+Rule sol87 1987 only - Aug 31 12:00:30s -0:00:30 -
+Rule sol87 1987 only - Sep 1 12:00:10s -0:00:10 -
+Rule sol87 1987 only - Sep 2 11:59:50s 0:00:10 -
+Rule sol87 1987 only - Sep 3 11:59:35s 0:00:25 -
+Rule sol87 1987 only - Sep 4 11:59:15s 0:00:45 -
+Rule sol87 1987 only - Sep 5 11:58:55s 0:01:05 -
+Rule sol87 1987 only - Sep 6 11:58:35s 0:01:25 -
+Rule sol87 1987 only - Sep 7 11:58:15s 0:01:45 -
+Rule sol87 1987 only - Sep 8 11:57:55s 0:02:05 -
+Rule sol87 1987 only - Sep 9 11:57:30s 0:02:30 -
+Rule sol87 1987 only - Sep 10 11:57:10s 0:02:50 -
+Rule sol87 1987 only - Sep 11 11:56:50s 0:03:10 -
+Rule sol87 1987 only - Sep 12 11:56:30s 0:03:30 -
+Rule sol87 1987 only - Sep 13 11:56:10s 0:03:50 -
+Rule sol87 1987 only - Sep 14 11:55:45s 0:04:15 -
+Rule sol87 1987 only - Sep 15 11:55:25s 0:04:35 -
+Rule sol87 1987 only - Sep 16 11:55:05s 0:04:55 -
+Rule sol87 1987 only - Sep 17 11:54:45s 0:05:15 -
+Rule sol87 1987 only - Sep 18 11:54:20s 0:05:40 -
+Rule sol87 1987 only - Sep 19 11:54:00s 0:06:00 -
+Rule sol87 1987 only - Sep 20 11:53:40s 0:06:20 -
+Rule sol87 1987 only - Sep 21 11:53:15s 0:06:45 -
+Rule sol87 1987 only - Sep 22 11:52:55s 0:07:05 -
+Rule sol87 1987 only - Sep 23 11:52:35s 0:07:25 -
+Rule sol87 1987 only - Sep 24 11:52:15s 0:07:45 -
+Rule sol87 1987 only - Sep 25 11:51:55s 0:08:05 -
+Rule sol87 1987 only - Sep 26 11:51:35s 0:08:25 -
+Rule sol87 1987 only - Sep 27 11:51:10s 0:08:50 -
+Rule sol87 1987 only - Sep 28 11:50:50s 0:09:10 -
+Rule sol87 1987 only - Sep 29 11:50:30s 0:09:30 -
+Rule sol87 1987 only - Sep 30 11:50:10s 0:09:50 -
+Rule sol87 1987 only - Oct 1 11:49:50s 0:10:10 -
+Rule sol87 1987 only - Oct 2 11:49:35s 0:10:25 -
+Rule sol87 1987 only - Oct 3 11:49:15s 0:10:45 -
+Rule sol87 1987 only - Oct 4 11:48:55s 0:11:05 -
+Rule sol87 1987 only - Oct 5 11:48:35s 0:11:25 -
+Rule sol87 1987 only - Oct 6 11:48:20s 0:11:40 -
+Rule sol87 1987 only - Oct 7 11:48:00s 0:12:00 -
+Rule sol87 1987 only - Oct 8 11:47:45s 0:12:15 -
+Rule sol87 1987 only - Oct 9 11:47:25s 0:12:35 -
+Rule sol87 1987 only - Oct 10 11:47:10s 0:12:50 -
+Rule sol87 1987 only - Oct 11 11:46:55s 0:13:05 -
+Rule sol87 1987 only - Oct 12 11:46:40s 0:13:20 -
+Rule sol87 1987 only - Oct 13 11:46:25s 0:13:35 -
+Rule sol87 1987 only - Oct 14 11:46:10s 0:13:50 -
+Rule sol87 1987 only - Oct 15 11:45:55s 0:14:05 -
+Rule sol87 1987 only - Oct 16 11:45:45s 0:14:15 -
+Rule sol87 1987 only - Oct 17 11:45:30s 0:14:30 -
+Rule sol87 1987 only - Oct 18 11:45:20s 0:14:40 -
+Rule sol87 1987 only - Oct 19 11:45:05s 0:14:55 -
+Rule sol87 1987 only - Oct 20 11:44:55s 0:15:05 -
+Rule sol87 1987 only - Oct 21 11:44:45s 0:15:15 -
+Rule sol87 1987 only - Oct 22 11:44:35s 0:15:25 -
+Rule sol87 1987 only - Oct 23 11:44:25s 0:15:35 -
+Rule sol87 1987 only - Oct 24 11:44:20s 0:15:40 -
+Rule sol87 1987 only - Oct 25 11:44:10s 0:15:50 -
+Rule sol87 1987 only - Oct 26 11:44:05s 0:15:55 -
+Rule sol87 1987 only - Oct 27 11:43:55s 0:16:05 -
+Rule sol87 1987 only - Oct 28 11:43:50s 0:16:10 -
+Rule sol87 1987 only - Oct 29 11:43:45s 0:16:15 -
+Rule sol87 1987 only - Oct 30 11:43:45s 0:16:15 -
+Rule sol87 1987 only - Oct 31 11:43:40s 0:16:20 -
+Rule sol87 1987 only - Nov 1 11:43:40s 0:16:20 -
+Rule sol87 1987 only - Nov 2 11:43:35s 0:16:25 -
+Rule sol87 1987 only - Nov 3 11:43:35s 0:16:25 -
+Rule sol87 1987 only - Nov 4 11:43:35s 0:16:25 -
+Rule sol87 1987 only - Nov 5 11:43:35s 0:16:25 -
+Rule sol87 1987 only - Nov 6 11:43:40s 0:16:20 -
+Rule sol87 1987 only - Nov 7 11:43:40s 0:16:20 -
+Rule sol87 1987 only - Nov 8 11:43:45s 0:16:15 -
+Rule sol87 1987 only - Nov 9 11:43:50s 0:16:10 -
+Rule sol87 1987 only - Nov 10 11:43:55s 0:16:05 -
+Rule sol87 1987 only - Nov 11 11:44:00s 0:16:00 -
+Rule sol87 1987 only - Nov 12 11:44:05s 0:15:55 -
+Rule sol87 1987 only - Nov 13 11:44:15s 0:15:45 -
+Rule sol87 1987 only - Nov 14 11:44:20s 0:15:40 -
+Rule sol87 1987 only - Nov 15 11:44:30s 0:15:30 -
+Rule sol87 1987 only - Nov 16 11:44:40s 0:15:20 -
+Rule sol87 1987 only - Nov 17 11:44:50s 0:15:10 -
+Rule sol87 1987 only - Nov 18 11:45:05s 0:14:55 -
+Rule sol87 1987 only - Nov 19 11:45:15s 0:14:45 -
+Rule sol87 1987 only - Nov 20 11:45:30s 0:14:30 -
+Rule sol87 1987 only - Nov 21 11:45:45s 0:14:15 -
+Rule sol87 1987 only - Nov 22 11:46:00s 0:14:00 -
+Rule sol87 1987 only - Nov 23 11:46:15s 0:13:45 -
+Rule sol87 1987 only - Nov 24 11:46:30s 0:13:30 -
+Rule sol87 1987 only - Nov 25 11:46:50s 0:13:10 -
+Rule sol87 1987 only - Nov 26 11:47:10s 0:12:50 -
+Rule sol87 1987 only - Nov 27 11:47:25s 0:12:35 -
+Rule sol87 1987 only - Nov 28 11:47:45s 0:12:15 -
+Rule sol87 1987 only - Nov 29 11:48:05s 0:11:55 -
+Rule sol87 1987 only - Nov 30 11:48:30s 0:11:30 -
+Rule sol87 1987 only - Dec 1 11:48:50s 0:11:10 -
+Rule sol87 1987 only - Dec 2 11:49:10s 0:10:50 -
+Rule sol87 1987 only - Dec 3 11:49:35s 0:10:25 -
+Rule sol87 1987 only - Dec 4 11:50:00s 0:10:00 -
+Rule sol87 1987 only - Dec 5 11:50:25s 0:09:35 -
+Rule sol87 1987 only - Dec 6 11:50:50s 0:09:10 -
+Rule sol87 1987 only - Dec 7 11:51:15s 0:08:45 -
+Rule sol87 1987 only - Dec 8 11:51:40s 0:08:20 -
+Rule sol87 1987 only - Dec 9 11:52:05s 0:07:55 -
+Rule sol87 1987 only - Dec 10 11:52:30s 0:07:30 -
+Rule sol87 1987 only - Dec 11 11:53:00s 0:07:00 -
+Rule sol87 1987 only - Dec 12 11:53:25s 0:06:35 -
+Rule sol87 1987 only - Dec 13 11:53:55s 0:06:05 -
+Rule sol87 1987 only - Dec 14 11:54:25s 0:05:35 -
+Rule sol87 1987 only - Dec 15 11:54:50s 0:05:10 -
+Rule sol87 1987 only - Dec 16 11:55:20s 0:04:40 -
+Rule sol87 1987 only - Dec 17 11:55:50s 0:04:10 -
+Rule sol87 1987 only - Dec 18 11:56:20s 0:03:40 -
+Rule sol87 1987 only - Dec 19 11:56:50s 0:03:10 -
+Rule sol87 1987 only - Dec 20 11:57:20s 0:02:40 -
+Rule sol87 1987 only - Dec 21 11:57:50s 0:02:10 -
+Rule sol87 1987 only - Dec 22 11:58:20s 0:01:40 -
+Rule sol87 1987 only - Dec 23 11:58:50s 0:01:10 -
+Rule sol87 1987 only - Dec 24 11:59:20s 0:00:40 -
+Rule sol87 1987 only - Dec 25 11:59:50s 0:00:10 -
+Rule sol87 1987 only - Dec 26 12:00:20s -0:00:20 -
+Rule sol87 1987 only - Dec 27 12:00:45s -0:00:45 -
+Rule sol87 1987 only - Dec 28 12:01:15s -0:01:15 -
+Rule sol87 1987 only - Dec 29 12:01:45s -0:01:45 -
+Rule sol87 1987 only - Dec 30 12:02:15s -0:02:15 -
+Rule sol87 1987 only - Dec 31 12:02:45s -0:02:45 -
+
+# Riyadh is at about 46 degrees 46 minutes East: 3 hrs, 7 mins, 4 secs
+# 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 - ??
+# For backward compatibility...
+Link Asia/Riyadh87 Mideast/Riyadh87
--- /dev/null
+# @(#)solar88 7.3
+
+# 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
+# Almanac for Computers 1988; the formulas "will give EqT to an accuracy of
+# [plus or minus two] seconds during the current year."
+#
+# Rounding to the nearest five seconds results in fewer than
+# 256 different "time types"--a limit that's faced because time types are
+# stored on disk as unsigned chars.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule sol88 1988 only - Jan 1 12:03:15s -0:03:15 -
+Rule sol88 1988 only - Jan 2 12:03:40s -0:03:40 -
+Rule sol88 1988 only - Jan 3 12:04:10s -0:04:10 -
+Rule sol88 1988 only - Jan 4 12:04:40s -0:04:40 -
+Rule sol88 1988 only - Jan 5 12:05:05s -0:05:05 -
+Rule sol88 1988 only - Jan 6 12:05:30s -0:05:30 -
+Rule sol88 1988 only - Jan 7 12:06:00s -0:06:00 -
+Rule sol88 1988 only - Jan 8 12:06:25s -0:06:25 -
+Rule sol88 1988 only - Jan 9 12:06:50s -0:06:50 -
+Rule sol88 1988 only - Jan 10 12:07:15s -0:07:15 -
+Rule sol88 1988 only - Jan 11 12:07:40s -0:07:40 -
+Rule sol88 1988 only - Jan 12 12:08:05s -0:08:05 -
+Rule sol88 1988 only - Jan 13 12:08:25s -0:08:25 -
+Rule sol88 1988 only - Jan 14 12:08:50s -0:08:50 -
+Rule sol88 1988 only - Jan 15 12:09:10s -0:09:10 -
+Rule sol88 1988 only - Jan 16 12:09:30s -0:09:30 -
+Rule sol88 1988 only - Jan 17 12:09:50s -0:09:50 -
+Rule sol88 1988 only - Jan 18 12:10:10s -0:10:10 -
+Rule sol88 1988 only - Jan 19 12:10:30s -0:10:30 -
+Rule sol88 1988 only - Jan 20 12:10:50s -0:10:50 -
+Rule sol88 1988 only - Jan 21 12:11:05s -0:11:05 -
+Rule sol88 1988 only - Jan 22 12:11:25s -0:11:25 -
+Rule sol88 1988 only - Jan 23 12:11:40s -0:11:40 -
+Rule sol88 1988 only - Jan 24 12:11:55s -0:11:55 -
+Rule sol88 1988 only - Jan 25 12:12:10s -0:12:10 -
+Rule sol88 1988 only - Jan 26 12:12:25s -0:12:25 -
+Rule sol88 1988 only - Jan 27 12:12:40s -0:12:40 -
+Rule sol88 1988 only - Jan 28 12:12:50s -0:12:50 -
+Rule sol88 1988 only - Jan 29 12:13:00s -0:13:00 -
+Rule sol88 1988 only - Jan 30 12:13:10s -0:13:10 -
+Rule sol88 1988 only - Jan 31 12:13:20s -0:13:20 -
+Rule sol88 1988 only - Feb 1 12:13:30s -0:13:30 -
+Rule sol88 1988 only - Feb 2 12:13:40s -0:13:40 -
+Rule sol88 1988 only - Feb 3 12:13:45s -0:13:45 -
+Rule sol88 1988 only - Feb 4 12:13:55s -0:13:55 -
+Rule sol88 1988 only - Feb 5 12:14:00s -0:14:00 -
+Rule sol88 1988 only - Feb 6 12:14:05s -0:14:05 -
+Rule sol88 1988 only - Feb 7 12:14:10s -0:14:10 -
+Rule sol88 1988 only - Feb 8 12:14:10s -0:14:10 -
+Rule sol88 1988 only - Feb 9 12:14:15s -0:14:15 -
+Rule sol88 1988 only - Feb 10 12:14:15s -0:14:15 -
+Rule sol88 1988 only - Feb 11 12:14:15s -0:14:15 -
+Rule sol88 1988 only - Feb 12 12:14:15s -0:14:15 -
+Rule sol88 1988 only - Feb 13 12:14:15s -0:14:15 -
+Rule sol88 1988 only - Feb 14 12:14:15s -0:14:15 -
+Rule sol88 1988 only - Feb 15 12:14:10s -0:14:10 -
+Rule sol88 1988 only - Feb 16 12:14:10s -0:14:10 -
+Rule sol88 1988 only - Feb 17 12:14:05s -0:14:05 -
+Rule sol88 1988 only - Feb 18 12:14:00s -0:14:00 -
+Rule sol88 1988 only - Feb 19 12:13:55s -0:13:55 -
+Rule sol88 1988 only - Feb 20 12:13:50s -0:13:50 -
+Rule sol88 1988 only - Feb 21 12:13:45s -0:13:45 -
+Rule sol88 1988 only - Feb 22 12:13:40s -0:13:40 -
+Rule sol88 1988 only - Feb 23 12:13:30s -0:13:30 -
+Rule sol88 1988 only - Feb 24 12:13:20s -0:13:20 -
+Rule sol88 1988 only - Feb 25 12:13:15s -0:13:15 -
+Rule sol88 1988 only - Feb 26 12:13:05s -0:13:05 -
+Rule sol88 1988 only - Feb 27 12:12:55s -0:12:55 -
+Rule sol88 1988 only - Feb 28 12:12:45s -0:12:45 -
+Rule sol88 1988 only - Feb 29 12:12:30s -0:12:30 -
+Rule sol88 1988 only - Mar 1 12:12:20s -0:12:20 -
+Rule sol88 1988 only - Mar 2 12:12:10s -0:12:10 -
+Rule sol88 1988 only - Mar 3 12:11:55s -0:11:55 -
+Rule sol88 1988 only - Mar 4 12:11:45s -0:11:45 -
+Rule sol88 1988 only - Mar 5 12:11:30s -0:11:30 -
+Rule sol88 1988 only - Mar 6 12:11:15s -0:11:15 -
+Rule sol88 1988 only - Mar 7 12:11:00s -0:11:00 -
+Rule sol88 1988 only - Mar 8 12:10:45s -0:10:45 -
+Rule sol88 1988 only - Mar 9 12:10:30s -0:10:30 -
+Rule sol88 1988 only - Mar 10 12:10:15s -0:10:15 -
+Rule sol88 1988 only - Mar 11 12:10:00s -0:10:00 -
+Rule sol88 1988 only - Mar 12 12:09:45s -0:09:45 -
+Rule sol88 1988 only - Mar 13 12:09:30s -0:09:30 -
+Rule sol88 1988 only - Mar 14 12:09:10s -0:09:10 -
+Rule sol88 1988 only - Mar 15 12:08:55s -0:08:55 -
+Rule sol88 1988 only - Mar 16 12:08:40s -0:08:40 -
+Rule sol88 1988 only - Mar 17 12:08:20s -0:08:20 -
+Rule sol88 1988 only - Mar 18 12:08:05s -0:08:05 -
+Rule sol88 1988 only - Mar 19 12:07:45s -0:07:45 -
+Rule sol88 1988 only - Mar 20 12:07:30s -0:07:30 -
+Rule sol88 1988 only - Mar 21 12:07:10s -0:07:10 -
+Rule sol88 1988 only - Mar 22 12:06:50s -0:06:50 -
+Rule sol88 1988 only - Mar 23 12:06:35s -0:06:35 -
+Rule sol88 1988 only - Mar 24 12:06:15s -0:06:15 -
+Rule sol88 1988 only - Mar 25 12:06:00s -0:06:00 -
+Rule sol88 1988 only - Mar 26 12:05:40s -0:05:40 -
+Rule sol88 1988 only - Mar 27 12:05:20s -0:05:20 -
+Rule sol88 1988 only - Mar 28 12:05:05s -0:05:05 -
+Rule sol88 1988 only - Mar 29 12:04:45s -0:04:45 -
+Rule sol88 1988 only - Mar 30 12:04:25s -0:04:25 -
+Rule sol88 1988 only - Mar 31 12:04:10s -0:04:10 -
+Rule sol88 1988 only - Apr 1 12:03:50s -0:03:50 -
+Rule sol88 1988 only - Apr 2 12:03:35s -0:03:35 -
+Rule sol88 1988 only - Apr 3 12:03:15s -0:03:15 -
+Rule sol88 1988 only - Apr 4 12:03:00s -0:03:00 -
+Rule sol88 1988 only - Apr 5 12:02:40s -0:02:40 -
+Rule sol88 1988 only - Apr 6 12:02:25s -0:02:25 -
+Rule sol88 1988 only - Apr 7 12:02:05s -0:02:05 -
+Rule sol88 1988 only - Apr 8 12:01:50s -0:01:50 -
+Rule sol88 1988 only - Apr 9 12:01:35s -0:01:35 -
+Rule sol88 1988 only - Apr 10 12:01:15s -0:01:15 -
+Rule sol88 1988 only - Apr 11 12:01:00s -0:01:00 -
+Rule sol88 1988 only - Apr 12 12:00:45s -0:00:45 -
+Rule sol88 1988 only - Apr 13 12:00:30s -0:00:30 -
+Rule sol88 1988 only - Apr 14 12:00:15s -0:00:15 -
+Rule sol88 1988 only - Apr 15 12:00:00s 0:00:00 -
+Rule sol88 1988 only - Apr 16 11:59:45s 0:00:15 -
+Rule sol88 1988 only - Apr 17 11:59:30s 0:00:30 -
+Rule sol88 1988 only - Apr 18 11:59:20s 0:00:40 -
+Rule sol88 1988 only - Apr 19 11:59:05s 0:00:55 -
+Rule sol88 1988 only - Apr 20 11:58:55s 0:01:05 -
+Rule sol88 1988 only - Apr 21 11:58:40s 0:01:20 -
+Rule sol88 1988 only - Apr 22 11:58:30s 0:01:30 -
+Rule sol88 1988 only - Apr 23 11:58:15s 0:01:45 -
+Rule sol88 1988 only - Apr 24 11:58:05s 0:01:55 -
+Rule sol88 1988 only - Apr 25 11:57:55s 0:02:05 -
+Rule sol88 1988 only - Apr 26 11:57:45s 0:02:15 -
+Rule sol88 1988 only - Apr 27 11:57:35s 0:02:25 -
+Rule sol88 1988 only - Apr 28 11:57:30s 0:02:30 -
+Rule sol88 1988 only - Apr 29 11:57:20s 0:02:40 -
+Rule sol88 1988 only - Apr 30 11:57:10s 0:02:50 -
+Rule sol88 1988 only - May 1 11:57:05s 0:02:55 -
+Rule sol88 1988 only - May 2 11:56:55s 0:03:05 -
+Rule sol88 1988 only - May 3 11:56:50s 0:03:10 -
+Rule sol88 1988 only - May 4 11:56:45s 0:03:15 -
+Rule sol88 1988 only - May 5 11:56:40s 0:03:20 -
+Rule sol88 1988 only - May 6 11:56:35s 0:03:25 -
+Rule sol88 1988 only - May 7 11:56:30s 0:03:30 -
+Rule sol88 1988 only - May 8 11:56:25s 0:03:35 -
+Rule sol88 1988 only - May 9 11:56:25s 0:03:35 -
+Rule sol88 1988 only - May 10 11:56:20s 0:03:40 -
+Rule sol88 1988 only - May 11 11:56:20s 0:03:40 -
+Rule sol88 1988 only - May 12 11:56:20s 0:03:40 -
+Rule sol88 1988 only - May 13 11:56:20s 0:03:40 -
+Rule sol88 1988 only - May 14 11:56:20s 0:03:40 -
+Rule sol88 1988 only - May 15 11:56:20s 0:03:40 -
+Rule sol88 1988 only - May 16 11:56:20s 0:03:40 -
+Rule sol88 1988 only - May 17 11:56:20s 0:03:40 -
+Rule sol88 1988 only - May 18 11:56:25s 0:03:35 -
+Rule sol88 1988 only - May 19 11:56:25s 0:03:35 -
+Rule sol88 1988 only - May 20 11:56:30s 0:03:30 -
+Rule sol88 1988 only - May 21 11:56:35s 0:03:25 -
+Rule sol88 1988 only - May 22 11:56:40s 0:03:20 -
+Rule sol88 1988 only - May 23 11:56:45s 0:03:15 -
+Rule sol88 1988 only - May 24 11:56:50s 0:03:10 -
+Rule sol88 1988 only - May 25 11:56:55s 0:03:05 -
+Rule sol88 1988 only - May 26 11:57:00s 0:03:00 -
+Rule sol88 1988 only - May 27 11:57:05s 0:02:55 -
+Rule sol88 1988 only - May 28 11:57:15s 0:02:45 -
+Rule sol88 1988 only - May 29 11:57:20s 0:02:40 -
+Rule sol88 1988 only - May 30 11:57:30s 0:02:30 -
+Rule sol88 1988 only - May 31 11:57:40s 0:02:20 -
+Rule sol88 1988 only - Jun 1 11:57:50s 0:02:10 -
+Rule sol88 1988 only - Jun 2 11:57:55s 0:02:05 -
+Rule sol88 1988 only - Jun 3 11:58:05s 0:01:55 -
+Rule sol88 1988 only - Jun 4 11:58:15s 0:01:45 -
+Rule sol88 1988 only - Jun 5 11:58:30s 0:01:30 -
+Rule sol88 1988 only - Jun 6 11:58:40s 0:01:20 -
+Rule sol88 1988 only - Jun 7 11:58:50s 0:01:10 -
+Rule sol88 1988 only - Jun 8 11:59:00s 0:01:00 -
+Rule sol88 1988 only - Jun 9 11:59:15s 0:00:45 -
+Rule sol88 1988 only - Jun 10 11:59:25s 0:00:35 -
+Rule sol88 1988 only - Jun 11 11:59:35s 0:00:25 -
+Rule sol88 1988 only - Jun 12 11:59:50s 0:00:10 -
+Rule sol88 1988 only - Jun 13 12:00:00s 0:00:00 -
+Rule sol88 1988 only - Jun 14 12:00:15s -0:00:15 -
+Rule sol88 1988 only - Jun 15 12:00:25s -0:00:25 -
+Rule sol88 1988 only - Jun 16 12:00:40s -0:00:40 -
+Rule sol88 1988 only - Jun 17 12:00:55s -0:00:55 -
+Rule sol88 1988 only - Jun 18 12:01:05s -0:01:05 -
+Rule sol88 1988 only - Jun 19 12:01:20s -0:01:20 -
+Rule sol88 1988 only - Jun 20 12:01:30s -0:01:30 -
+Rule sol88 1988 only - Jun 21 12:01:45s -0:01:45 -
+Rule sol88 1988 only - Jun 22 12:02:00s -0:02:00 -
+Rule sol88 1988 only - Jun 23 12:02:10s -0:02:10 -
+Rule sol88 1988 only - Jun 24 12:02:25s -0:02:25 -
+Rule sol88 1988 only - Jun 25 12:02:35s -0:02:35 -
+Rule sol88 1988 only - Jun 26 12:02:50s -0:02:50 -
+Rule sol88 1988 only - Jun 27 12:03:00s -0:03:00 -
+Rule sol88 1988 only - Jun 28 12:03:15s -0:03:15 -
+Rule sol88 1988 only - Jun 29 12:03:25s -0:03:25 -
+Rule sol88 1988 only - Jun 30 12:03:40s -0:03:40 -
+Rule sol88 1988 only - Jul 1 12:03:50s -0:03:50 -
+Rule sol88 1988 only - Jul 2 12:04:00s -0:04:00 -
+Rule sol88 1988 only - Jul 3 12:04:10s -0:04:10 -
+Rule sol88 1988 only - Jul 4 12:04:25s -0:04:25 -
+Rule sol88 1988 only - Jul 5 12:04:35s -0:04:35 -
+Rule sol88 1988 only - Jul 6 12:04:45s -0:04:45 -
+Rule sol88 1988 only - Jul 7 12:04:55s -0:04:55 -
+Rule sol88 1988 only - Jul 8 12:05:05s -0:05:05 -
+Rule sol88 1988 only - Jul 9 12:05:10s -0:05:10 -
+Rule sol88 1988 only - Jul 10 12:05:20s -0:05:20 -
+Rule sol88 1988 only - Jul 11 12:05:30s -0:05:30 -
+Rule sol88 1988 only - Jul 12 12:05:35s -0:05:35 -
+Rule sol88 1988 only - Jul 13 12:05:45s -0:05:45 -
+Rule sol88 1988 only - Jul 14 12:05:50s -0:05:50 -
+Rule sol88 1988 only - Jul 15 12:05:55s -0:05:55 -
+Rule sol88 1988 only - Jul 16 12:06:00s -0:06:00 -
+Rule sol88 1988 only - Jul 17 12:06:05s -0:06:05 -
+Rule sol88 1988 only - Jul 18 12:06:10s -0:06:10 -
+Rule sol88 1988 only - Jul 19 12:06:15s -0:06:15 -
+Rule sol88 1988 only - Jul 20 12:06:20s -0:06:20 -
+Rule sol88 1988 only - Jul 21 12:06:25s -0:06:25 -
+Rule sol88 1988 only - Jul 22 12:06:25s -0:06:25 -
+Rule sol88 1988 only - Jul 23 12:06:25s -0:06:25 -
+Rule sol88 1988 only - Jul 24 12:06:30s -0:06:30 -
+Rule sol88 1988 only - Jul 25 12:06:30s -0:06:30 -
+Rule sol88 1988 only - Jul 26 12:06:30s -0:06:30 -
+Rule sol88 1988 only - Jul 27 12:06:30s -0:06:30 -
+Rule sol88 1988 only - Jul 28 12:06:30s -0:06:30 -
+Rule sol88 1988 only - Jul 29 12:06:25s -0:06:25 -
+Rule sol88 1988 only - Jul 30 12:06:25s -0:06:25 -
+Rule sol88 1988 only - Jul 31 12:06:20s -0:06:20 -
+Rule sol88 1988 only - Aug 1 12:06:15s -0:06:15 -
+Rule sol88 1988 only - Aug 2 12:06:15s -0:06:15 -
+Rule sol88 1988 only - Aug 3 12:06:10s -0:06:10 -
+Rule sol88 1988 only - Aug 4 12:06:05s -0:06:05 -
+Rule sol88 1988 only - Aug 5 12:05:55s -0:05:55 -
+Rule sol88 1988 only - Aug 6 12:05:50s -0:05:50 -
+Rule sol88 1988 only - Aug 7 12:05:45s -0:05:45 -
+Rule sol88 1988 only - Aug 8 12:05:35s -0:05:35 -
+Rule sol88 1988 only - Aug 9 12:05:25s -0:05:25 -
+Rule sol88 1988 only - Aug 10 12:05:20s -0:05:20 -
+Rule sol88 1988 only - Aug 11 12:05:10s -0:05:10 -
+Rule sol88 1988 only - Aug 12 12:05:00s -0:05:00 -
+Rule sol88 1988 only - Aug 13 12:04:50s -0:04:50 -
+Rule sol88 1988 only - Aug 14 12:04:35s -0:04:35 -
+Rule sol88 1988 only - Aug 15 12:04:25s -0:04:25 -
+Rule sol88 1988 only - Aug 16 12:04:15s -0:04:15 -
+Rule sol88 1988 only - Aug 17 12:04:00s -0:04:00 -
+Rule sol88 1988 only - Aug 18 12:03:50s -0:03:50 -
+Rule sol88 1988 only - Aug 19 12:03:35s -0:03:35 -
+Rule sol88 1988 only - Aug 20 12:03:20s -0:03:20 -
+Rule sol88 1988 only - Aug 21 12:03:05s -0:03:05 -
+Rule sol88 1988 only - Aug 22 12:02:50s -0:02:50 -
+Rule sol88 1988 only - Aug 23 12:02:35s -0:02:35 -
+Rule sol88 1988 only - Aug 24 12:02:20s -0:02:20 -
+Rule sol88 1988 only - Aug 25 12:02:00s -0:02:00 -
+Rule sol88 1988 only - Aug 26 12:01:45s -0:01:45 -
+Rule sol88 1988 only - Aug 27 12:01:30s -0:01:30 -
+Rule sol88 1988 only - Aug 28 12:01:10s -0:01:10 -
+Rule sol88 1988 only - Aug 29 12:00:50s -0:00:50 -
+Rule sol88 1988 only - Aug 30 12:00:35s -0:00:35 -
+Rule sol88 1988 only - Aug 31 12:00:15s -0:00:15 -
+Rule sol88 1988 only - Sep 1 11:59:55s 0:00:05 -
+Rule sol88 1988 only - Sep 2 11:59:35s 0:00:25 -
+Rule sol88 1988 only - Sep 3 11:59:20s 0:00:40 -
+Rule sol88 1988 only - Sep 4 11:59:00s 0:01:00 -
+Rule sol88 1988 only - Sep 5 11:58:40s 0:01:20 -
+Rule sol88 1988 only - Sep 6 11:58:20s 0:01:40 -
+Rule sol88 1988 only - Sep 7 11:58:00s 0:02:00 -
+Rule sol88 1988 only - Sep 8 11:57:35s 0:02:25 -
+Rule sol88 1988 only - Sep 9 11:57:15s 0:02:45 -
+Rule sol88 1988 only - Sep 10 11:56:55s 0:03:05 -
+Rule sol88 1988 only - Sep 11 11:56:35s 0:03:25 -
+Rule sol88 1988 only - Sep 12 11:56:15s 0:03:45 -
+Rule sol88 1988 only - Sep 13 11:55:50s 0:04:10 -
+Rule sol88 1988 only - Sep 14 11:55:30s 0:04:30 -
+Rule sol88 1988 only - Sep 15 11:55:10s 0:04:50 -
+Rule sol88 1988 only - Sep 16 11:54:50s 0:05:10 -
+Rule sol88 1988 only - Sep 17 11:54:25s 0:05:35 -
+Rule sol88 1988 only - Sep 18 11:54:05s 0:05:55 -
+Rule sol88 1988 only - Sep 19 11:53:45s 0:06:15 -
+Rule sol88 1988 only - Sep 20 11:53:25s 0:06:35 -
+Rule sol88 1988 only - Sep 21 11:53:00s 0:07:00 -
+Rule sol88 1988 only - Sep 22 11:52:40s 0:07:20 -
+Rule sol88 1988 only - Sep 23 11:52:20s 0:07:40 -
+Rule sol88 1988 only - Sep 24 11:52:00s 0:08:00 -
+Rule sol88 1988 only - Sep 25 11:51:40s 0:08:20 -
+Rule sol88 1988 only - Sep 26 11:51:15s 0:08:45 -
+Rule sol88 1988 only - Sep 27 11:50:55s 0:09:05 -
+Rule sol88 1988 only - Sep 28 11:50:35s 0:09:25 -
+Rule sol88 1988 only - Sep 29 11:50:15s 0:09:45 -
+Rule sol88 1988 only - Sep 30 11:49:55s 0:10:05 -
+Rule sol88 1988 only - Oct 1 11:49:35s 0:10:25 -
+Rule sol88 1988 only - Oct 2 11:49:20s 0:10:40 -
+Rule sol88 1988 only - Oct 3 11:49:00s 0:11:00 -
+Rule sol88 1988 only - Oct 4 11:48:40s 0:11:20 -
+Rule sol88 1988 only - Oct 5 11:48:25s 0:11:35 -
+Rule sol88 1988 only - Oct 6 11:48:05s 0:11:55 -
+Rule sol88 1988 only - Oct 7 11:47:50s 0:12:10 -
+Rule sol88 1988 only - Oct 8 11:47:30s 0:12:30 -
+Rule sol88 1988 only - Oct 9 11:47:15s 0:12:45 -
+Rule sol88 1988 only - Oct 10 11:47:00s 0:13:00 -
+Rule sol88 1988 only - Oct 11 11:46:45s 0:13:15 -
+Rule sol88 1988 only - Oct 12 11:46:30s 0:13:30 -
+Rule sol88 1988 only - Oct 13 11:46:15s 0:13:45 -
+Rule sol88 1988 only - Oct 14 11:46:00s 0:14:00 -
+Rule sol88 1988 only - Oct 15 11:45:45s 0:14:15 -
+Rule sol88 1988 only - Oct 16 11:45:35s 0:14:25 -
+Rule sol88 1988 only - Oct 17 11:45:20s 0:14:40 -
+Rule sol88 1988 only - Oct 18 11:45:10s 0:14:50 -
+Rule sol88 1988 only - Oct 19 11:45:00s 0:15:00 -
+Rule sol88 1988 only - Oct 20 11:44:45s 0:15:15 -
+Rule sol88 1988 only - Oct 21 11:44:40s 0:15:20 -
+Rule sol88 1988 only - Oct 22 11:44:30s 0:15:30 -
+Rule sol88 1988 only - Oct 23 11:44:20s 0:15:40 -
+Rule sol88 1988 only - Oct 24 11:44:10s 0:15:50 -
+Rule sol88 1988 only - Oct 25 11:44:05s 0:15:55 -
+Rule sol88 1988 only - Oct 26 11:44:00s 0:16:00 -
+Rule sol88 1988 only - Oct 27 11:43:55s 0:16:05 -
+Rule sol88 1988 only - Oct 28 11:43:50s 0:16:10 -
+Rule sol88 1988 only - Oct 29 11:43:45s 0:16:15 -
+Rule sol88 1988 only - Oct 30 11:43:40s 0:16:20 -
+Rule sol88 1988 only - Oct 31 11:43:40s 0:16:20 -
+Rule sol88 1988 only - Nov 1 11:43:35s 0:16:25 -
+Rule sol88 1988 only - Nov 2 11:43:35s 0:16:25 -
+Rule sol88 1988 only - Nov 3 11:43:35s 0:16:25 -
+Rule sol88 1988 only - Nov 4 11:43:35s 0:16:25 -
+Rule sol88 1988 only - Nov 5 11:43:40s 0:16:20 -
+Rule sol88 1988 only - Nov 6 11:43:40s 0:16:20 -
+Rule sol88 1988 only - Nov 7 11:43:45s 0:16:15 -
+Rule sol88 1988 only - Nov 8 11:43:45s 0:16:15 -
+Rule sol88 1988 only - Nov 9 11:43:50s 0:16:10 -
+Rule sol88 1988 only - Nov 10 11:44:00s 0:16:00 -
+Rule sol88 1988 only - Nov 11 11:44:05s 0:15:55 -
+Rule sol88 1988 only - Nov 12 11:44:10s 0:15:50 -
+Rule sol88 1988 only - Nov 13 11:44:20s 0:15:40 -
+Rule sol88 1988 only - Nov 14 11:44:30s 0:15:30 -
+Rule sol88 1988 only - Nov 15 11:44:40s 0:15:20 -
+Rule sol88 1988 only - Nov 16 11:44:50s 0:15:10 -
+Rule sol88 1988 only - Nov 17 11:45:00s 0:15:00 -
+Rule sol88 1988 only - Nov 18 11:45:15s 0:14:45 -
+Rule sol88 1988 only - Nov 19 11:45:25s 0:14:35 -
+Rule sol88 1988 only - Nov 20 11:45:40s 0:14:20 -
+Rule sol88 1988 only - Nov 21 11:45:55s 0:14:05 -
+Rule sol88 1988 only - Nov 22 11:46:10s 0:13:50 -
+Rule sol88 1988 only - Nov 23 11:46:30s 0:13:30 -
+Rule sol88 1988 only - Nov 24 11:46:45s 0:13:15 -
+Rule sol88 1988 only - Nov 25 11:47:05s 0:12:55 -
+Rule sol88 1988 only - Nov 26 11:47:20s 0:12:40 -
+Rule sol88 1988 only - Nov 27 11:47:40s 0:12:20 -
+Rule sol88 1988 only - Nov 28 11:48:00s 0:12:00 -
+Rule sol88 1988 only - Nov 29 11:48:25s 0:11:35 -
+Rule sol88 1988 only - Nov 30 11:48:45s 0:11:15 -
+Rule sol88 1988 only - Dec 1 11:49:05s 0:10:55 -
+Rule sol88 1988 only - Dec 2 11:49:30s 0:10:30 -
+Rule sol88 1988 only - Dec 3 11:49:55s 0:10:05 -
+Rule sol88 1988 only - Dec 4 11:50:15s 0:09:45 -
+Rule sol88 1988 only - Dec 5 11:50:40s 0:09:20 -
+Rule sol88 1988 only - Dec 6 11:51:05s 0:08:55 -
+Rule sol88 1988 only - Dec 7 11:51:35s 0:08:25 -
+Rule sol88 1988 only - Dec 8 11:52:00s 0:08:00 -
+Rule sol88 1988 only - Dec 9 11:52:25s 0:07:35 -
+Rule sol88 1988 only - Dec 10 11:52:55s 0:07:05 -
+Rule sol88 1988 only - Dec 11 11:53:20s 0:06:40 -
+Rule sol88 1988 only - Dec 12 11:53:50s 0:06:10 -
+Rule sol88 1988 only - Dec 13 11:54:15s 0:05:45 -
+Rule sol88 1988 only - Dec 14 11:54:45s 0:05:15 -
+Rule sol88 1988 only - Dec 15 11:55:15s 0:04:45 -
+Rule sol88 1988 only - Dec 16 11:55:45s 0:04:15 -
+Rule sol88 1988 only - Dec 17 11:56:15s 0:03:45 -
+Rule sol88 1988 only - Dec 18 11:56:40s 0:03:20 -
+Rule sol88 1988 only - Dec 19 11:57:10s 0:02:50 -
+Rule sol88 1988 only - Dec 20 11:57:40s 0:02:20 -
+Rule sol88 1988 only - Dec 21 11:58:10s 0:01:50 -
+Rule sol88 1988 only - Dec 22 11:58:40s 0:01:20 -
+Rule sol88 1988 only - Dec 23 11:59:10s 0:00:50 -
+Rule sol88 1988 only - Dec 24 11:59:40s 0:00:20 -
+Rule sol88 1988 only - Dec 25 12:00:10s -0:00:10 -
+Rule sol88 1988 only - Dec 26 12:00:40s -0:00:40 -
+Rule sol88 1988 only - Dec 27 12:01:10s -0:01:10 -
+Rule sol88 1988 only - Dec 28 12:01:40s -0:01:40 -
+Rule sol88 1988 only - Dec 29 12:02:10s -0:02:10 -
+Rule sol88 1988 only - Dec 30 12:02:35s -0:02:35 -
+Rule sol88 1988 only - Dec 31 12:03:05s -0:03:05 -
+
+# Riyadh is at about 46 degrees 46 minutes East: 3 hrs, 7 mins, 4 secs
+# 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 - ??
+# For backward compatibility...
+Link Asia/Riyadh88 Mideast/Riyadh88
--- /dev/null
+# @(#)solar89 7.4
+
+# 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:
+# eqt = -105.8 * sin(l) + 596.2 * sin(2 * l) + 4.4 * sin(3 * l)
+# -12.7 * sin(4 * l) - 429.0 * cos(l) - 2.1 * cos (2 * l)
+# + 19.3 * cos(3 * l);
+# where l is the "mean longitude of the Sun" given by
+# l = 279.642 degrees + 0.985647 * d
+# and d is the interval in days from January 0, 0 hours Universal Time
+# (equaling the day of the year plus the fraction of a day from zero hours).
+# The accuracy of the formula is plus or minus three seconds.
+#
+# Rounding to the nearest five seconds results in fewer than
+# 256 different "time types"--a limit that's faced because time types are
+# stored on disk as unsigned chars.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule sol89 1989 only - Jan 1 12:03:35s -0:03:35 -
+Rule sol89 1989 only - Jan 2 12:04:05s -0:04:05 -
+Rule sol89 1989 only - Jan 3 12:04:30s -0:04:30 -
+Rule sol89 1989 only - Jan 4 12:05:00s -0:05:00 -
+Rule sol89 1989 only - Jan 5 12:05:25s -0:05:25 -
+Rule sol89 1989 only - Jan 6 12:05:50s -0:05:50 -
+Rule sol89 1989 only - Jan 7 12:06:15s -0:06:15 -
+Rule sol89 1989 only - Jan 8 12:06:45s -0:06:45 -
+Rule sol89 1989 only - Jan 9 12:07:10s -0:07:10 -
+Rule sol89 1989 only - Jan 10 12:07:35s -0:07:35 -
+Rule sol89 1989 only - Jan 11 12:07:55s -0:07:55 -
+Rule sol89 1989 only - Jan 12 12:08:20s -0:08:20 -
+Rule sol89 1989 only - Jan 13 12:08:45s -0:08:45 -
+Rule sol89 1989 only - Jan 14 12:09:05s -0:09:05 -
+Rule sol89 1989 only - Jan 15 12:09:25s -0:09:25 -
+Rule sol89 1989 only - Jan 16 12:09:45s -0:09:45 -
+Rule sol89 1989 only - Jan 17 12:10:05s -0:10:05 -
+Rule sol89 1989 only - Jan 18 12:10:25s -0:10:25 -
+Rule sol89 1989 only - Jan 19 12:10:45s -0:10:45 -
+Rule sol89 1989 only - Jan 20 12:11:05s -0:11:05 -
+Rule sol89 1989 only - Jan 21 12:11:20s -0:11:20 -
+Rule sol89 1989 only - Jan 22 12:11:35s -0:11:35 -
+Rule sol89 1989 only - Jan 23 12:11:55s -0:11:55 -
+Rule sol89 1989 only - Jan 24 12:12:10s -0:12:10 -
+Rule sol89 1989 only - Jan 25 12:12:20s -0:12:20 -
+Rule sol89 1989 only - Jan 26 12:12:35s -0:12:35 -
+Rule sol89 1989 only - Jan 27 12:12:50s -0:12:50 -
+Rule sol89 1989 only - Jan 28 12:13:00s -0:13:00 -
+Rule sol89 1989 only - Jan 29 12:13:10s -0:13:10 -
+Rule sol89 1989 only - Jan 30 12:13:20s -0:13:20 -
+Rule sol89 1989 only - Jan 31 12:13:30s -0:13:30 -
+Rule sol89 1989 only - Feb 1 12:13:40s -0:13:40 -
+Rule sol89 1989 only - Feb 2 12:13:45s -0:13:45 -
+Rule sol89 1989 only - Feb 3 12:13:55s -0:13:55 -
+Rule sol89 1989 only - Feb 4 12:14:00s -0:14:00 -
+Rule sol89 1989 only - Feb 5 12:14:05s -0:14:05 -
+Rule sol89 1989 only - Feb 6 12:14:10s -0:14:10 -
+Rule sol89 1989 only - Feb 7 12:14:10s -0:14:10 -
+Rule sol89 1989 only - Feb 8 12:14:15s -0:14:15 -
+Rule sol89 1989 only - Feb 9 12:14:15s -0:14:15 -
+Rule sol89 1989 only - Feb 10 12:14:20s -0:14:20 -
+Rule sol89 1989 only - Feb 11 12:14:20s -0:14:20 -
+Rule sol89 1989 only - Feb 12 12:14:20s -0:14:20 -
+Rule sol89 1989 only - Feb 13 12:14:15s -0:14:15 -
+Rule sol89 1989 only - Feb 14 12:14:15s -0:14:15 -
+Rule sol89 1989 only - Feb 15 12:14:10s -0:14:10 -
+Rule sol89 1989 only - Feb 16 12:14:10s -0:14:10 -
+Rule sol89 1989 only - Feb 17 12:14:05s -0:14:05 -
+Rule sol89 1989 only - Feb 18 12:14:00s -0:14:00 -
+Rule sol89 1989 only - Feb 19 12:13:55s -0:13:55 -
+Rule sol89 1989 only - Feb 20 12:13:50s -0:13:50 -
+Rule sol89 1989 only - Feb 21 12:13:40s -0:13:40 -
+Rule sol89 1989 only - Feb 22 12:13:35s -0:13:35 -
+Rule sol89 1989 only - Feb 23 12:13:25s -0:13:25 -
+Rule sol89 1989 only - Feb 24 12:13:15s -0:13:15 -
+Rule sol89 1989 only - Feb 25 12:13:05s -0:13:05 -
+Rule sol89 1989 only - Feb 26 12:12:55s -0:12:55 -
+Rule sol89 1989 only - Feb 27 12:12:45s -0:12:45 -
+Rule sol89 1989 only - Feb 28 12:12:35s -0:12:35 -
+Rule sol89 1989 only - Mar 1 12:12:25s -0:12:25 -
+Rule sol89 1989 only - Mar 2 12:12:10s -0:12:10 -
+Rule sol89 1989 only - Mar 3 12:12:00s -0:12:00 -
+Rule sol89 1989 only - Mar 4 12:11:45s -0:11:45 -
+Rule sol89 1989 only - Mar 5 12:11:35s -0:11:35 -
+Rule sol89 1989 only - Mar 6 12:11:20s -0:11:20 -
+Rule sol89 1989 only - Mar 7 12:11:05s -0:11:05 -
+Rule sol89 1989 only - Mar 8 12:10:50s -0:10:50 -
+Rule sol89 1989 only - Mar 9 12:10:35s -0:10:35 -
+Rule sol89 1989 only - Mar 10 12:10:20s -0:10:20 -
+Rule sol89 1989 only - Mar 11 12:10:05s -0:10:05 -
+Rule sol89 1989 only - Mar 12 12:09:50s -0:09:50 -
+Rule sol89 1989 only - Mar 13 12:09:30s -0:09:30 -
+Rule sol89 1989 only - Mar 14 12:09:15s -0:09:15 -
+Rule sol89 1989 only - Mar 15 12:09:00s -0:09:00 -
+Rule sol89 1989 only - Mar 16 12:08:40s -0:08:40 -
+Rule sol89 1989 only - Mar 17 12:08:25s -0:08:25 -
+Rule sol89 1989 only - Mar 18 12:08:05s -0:08:05 -
+Rule sol89 1989 only - Mar 19 12:07:50s -0:07:50 -
+Rule sol89 1989 only - Mar 20 12:07:30s -0:07:30 -
+Rule sol89 1989 only - Mar 21 12:07:15s -0:07:15 -
+Rule sol89 1989 only - Mar 22 12:06:55s -0:06:55 -
+Rule sol89 1989 only - Mar 23 12:06:35s -0:06:35 -
+Rule sol89 1989 only - Mar 24 12:06:20s -0:06:20 -
+Rule sol89 1989 only - Mar 25 12:06:00s -0:06:00 -
+Rule sol89 1989 only - Mar 26 12:05:40s -0:05:40 -
+Rule sol89 1989 only - Mar 27 12:05:25s -0:05:25 -
+Rule sol89 1989 only - Mar 28 12:05:05s -0:05:05 -
+Rule sol89 1989 only - Mar 29 12:04:50s -0:04:50 -
+Rule sol89 1989 only - Mar 30 12:04:30s -0:04:30 -
+Rule sol89 1989 only - Mar 31 12:04:10s -0:04:10 -
+Rule sol89 1989 only - Apr 1 12:03:55s -0:03:55 -
+Rule sol89 1989 only - Apr 2 12:03:35s -0:03:35 -
+Rule sol89 1989 only - Apr 3 12:03:20s -0:03:20 -
+Rule sol89 1989 only - Apr 4 12:03:00s -0:03:00 -
+Rule sol89 1989 only - Apr 5 12:02:45s -0:02:45 -
+Rule sol89 1989 only - Apr 6 12:02:25s -0:02:25 -
+Rule sol89 1989 only - Apr 7 12:02:10s -0:02:10 -
+Rule sol89 1989 only - Apr 8 12:01:50s -0:01:50 -
+Rule sol89 1989 only - Apr 9 12:01:35s -0:01:35 -
+Rule sol89 1989 only - Apr 10 12:01:20s -0:01:20 -
+Rule sol89 1989 only - Apr 11 12:01:05s -0:01:05 -
+Rule sol89 1989 only - Apr 12 12:00:50s -0:00:50 -
+Rule sol89 1989 only - Apr 13 12:00:35s -0:00:35 -
+Rule sol89 1989 only - Apr 14 12:00:20s -0:00:20 -
+Rule sol89 1989 only - Apr 15 12:00:05s -0:00:05 -
+Rule sol89 1989 only - Apr 16 11:59:50s 0:00:10 -
+Rule sol89 1989 only - Apr 17 11:59:35s 0:00:25 -
+Rule sol89 1989 only - Apr 18 11:59:20s 0:00:40 -
+Rule sol89 1989 only - Apr 19 11:59:10s 0:00:50 -
+Rule sol89 1989 only - Apr 20 11:58:55s 0:01:05 -
+Rule sol89 1989 only - Apr 21 11:58:45s 0:01:15 -
+Rule sol89 1989 only - Apr 22 11:58:30s 0:01:30 -
+Rule sol89 1989 only - Apr 23 11:58:20s 0:01:40 -
+Rule sol89 1989 only - Apr 24 11:58:10s 0:01:50 -
+Rule sol89 1989 only - Apr 25 11:58:00s 0:02:00 -
+Rule sol89 1989 only - Apr 26 11:57:50s 0:02:10 -
+Rule sol89 1989 only - Apr 27 11:57:40s 0:02:20 -
+Rule sol89 1989 only - Apr 28 11:57:30s 0:02:30 -
+Rule sol89 1989 only - Apr 29 11:57:20s 0:02:40 -
+Rule sol89 1989 only - Apr 30 11:57:15s 0:02:45 -
+Rule sol89 1989 only - May 1 11:57:05s 0:02:55 -
+Rule sol89 1989 only - May 2 11:57:00s 0:03:00 -
+Rule sol89 1989 only - May 3 11:56:50s 0:03:10 -
+Rule sol89 1989 only - May 4 11:56:45s 0:03:15 -
+Rule sol89 1989 only - May 5 11:56:40s 0:03:20 -
+Rule sol89 1989 only - May 6 11:56:35s 0:03:25 -
+Rule sol89 1989 only - May 7 11:56:30s 0:03:30 -
+Rule sol89 1989 only - May 8 11:56:30s 0:03:30 -
+Rule sol89 1989 only - May 9 11:56:25s 0:03:35 -
+Rule sol89 1989 only - May 10 11:56:25s 0:03:35 -
+Rule sol89 1989 only - May 11 11:56:20s 0:03:40 -
+Rule sol89 1989 only - May 12 11:56:20s 0:03:40 -
+Rule sol89 1989 only - May 13 11:56:20s 0:03:40 -
+Rule sol89 1989 only - May 14 11:56:20s 0:03:40 -
+Rule sol89 1989 only - May 15 11:56:20s 0:03:40 -
+Rule sol89 1989 only - May 16 11:56:20s 0:03:40 -
+Rule sol89 1989 only - May 17 11:56:20s 0:03:40 -
+Rule sol89 1989 only - May 18 11:56:25s 0:03:35 -
+Rule sol89 1989 only - May 19 11:56:25s 0:03:35 -
+Rule sol89 1989 only - May 20 11:56:30s 0:03:30 -
+Rule sol89 1989 only - May 21 11:56:35s 0:03:25 -
+Rule sol89 1989 only - May 22 11:56:35s 0:03:25 -
+Rule sol89 1989 only - May 23 11:56:40s 0:03:20 -
+Rule sol89 1989 only - May 24 11:56:45s 0:03:15 -
+Rule sol89 1989 only - May 25 11:56:55s 0:03:05 -
+Rule sol89 1989 only - May 26 11:57:00s 0:03:00 -
+Rule sol89 1989 only - May 27 11:57:05s 0:02:55 -
+Rule sol89 1989 only - May 28 11:57:15s 0:02:45 -
+Rule sol89 1989 only - May 29 11:57:20s 0:02:40 -
+Rule sol89 1989 only - May 30 11:57:30s 0:02:30 -
+Rule sol89 1989 only - May 31 11:57:35s 0:02:25 -
+Rule sol89 1989 only - Jun 1 11:57:45s 0:02:15 -
+Rule sol89 1989 only - Jun 2 11:57:55s 0:02:05 -
+Rule sol89 1989 only - Jun 3 11:58:05s 0:01:55 -
+Rule sol89 1989 only - Jun 4 11:58:15s 0:01:45 -
+Rule sol89 1989 only - Jun 5 11:58:25s 0:01:35 -
+Rule sol89 1989 only - Jun 6 11:58:35s 0:01:25 -
+Rule sol89 1989 only - Jun 7 11:58:45s 0:01:15 -
+Rule sol89 1989 only - Jun 8 11:59:00s 0:01:00 -
+Rule sol89 1989 only - Jun 9 11:59:10s 0:00:50 -
+Rule sol89 1989 only - Jun 10 11:59:20s 0:00:40 -
+Rule sol89 1989 only - Jun 11 11:59:35s 0:00:25 -
+Rule sol89 1989 only - Jun 12 11:59:45s 0:00:15 -
+Rule sol89 1989 only - Jun 13 12:00:00s 0:00:00 -
+Rule sol89 1989 only - Jun 14 12:00:10s -0:00:10 -
+Rule sol89 1989 only - Jun 15 12:00:25s -0:00:25 -
+Rule sol89 1989 only - Jun 16 12:00:35s -0:00:35 -
+Rule sol89 1989 only - Jun 17 12:00:50s -0:00:50 -
+Rule sol89 1989 only - Jun 18 12:01:05s -0:01:05 -
+Rule sol89 1989 only - Jun 19 12:01:15s -0:01:15 -
+Rule sol89 1989 only - Jun 20 12:01:30s -0:01:30 -
+Rule sol89 1989 only - Jun 21 12:01:40s -0:01:40 -
+Rule sol89 1989 only - Jun 22 12:01:55s -0:01:55 -
+Rule sol89 1989 only - Jun 23 12:02:10s -0:02:10 -
+Rule sol89 1989 only - Jun 24 12:02:20s -0:02:20 -
+Rule sol89 1989 only - Jun 25 12:02:35s -0:02:35 -
+Rule sol89 1989 only - Jun 26 12:02:45s -0:02:45 -
+Rule sol89 1989 only - Jun 27 12:03:00s -0:03:00 -
+Rule sol89 1989 only - Jun 28 12:03:10s -0:03:10 -
+Rule sol89 1989 only - Jun 29 12:03:25s -0:03:25 -
+Rule sol89 1989 only - Jun 30 12:03:35s -0:03:35 -
+Rule sol89 1989 only - Jul 1 12:03:45s -0:03:45 -
+Rule sol89 1989 only - Jul 2 12:04:00s -0:04:00 -
+Rule sol89 1989 only - Jul 3 12:04:10s -0:04:10 -
+Rule sol89 1989 only - Jul 4 12:04:20s -0:04:20 -
+Rule sol89 1989 only - Jul 5 12:04:30s -0:04:30 -
+Rule sol89 1989 only - Jul 6 12:04:40s -0:04:40 -
+Rule sol89 1989 only - Jul 7 12:04:50s -0:04:50 -
+Rule sol89 1989 only - Jul 8 12:05:00s -0:05:00 -
+Rule sol89 1989 only - Jul 9 12:05:10s -0:05:10 -
+Rule sol89 1989 only - Jul 10 12:05:20s -0:05:20 -
+Rule sol89 1989 only - Jul 11 12:05:25s -0:05:25 -
+Rule sol89 1989 only - Jul 12 12:05:35s -0:05:35 -
+Rule sol89 1989 only - Jul 13 12:05:40s -0:05:40 -
+Rule sol89 1989 only - Jul 14 12:05:50s -0:05:50 -
+Rule sol89 1989 only - Jul 15 12:05:55s -0:05:55 -
+Rule sol89 1989 only - Jul 16 12:06:00s -0:06:00 -
+Rule sol89 1989 only - Jul 17 12:06:05s -0:06:05 -
+Rule sol89 1989 only - Jul 18 12:06:10s -0:06:10 -
+Rule sol89 1989 only - Jul 19 12:06:15s -0:06:15 -
+Rule sol89 1989 only - Jul 20 12:06:20s -0:06:20 -
+Rule sol89 1989 only - Jul 21 12:06:20s -0:06:20 -
+Rule sol89 1989 only - Jul 22 12:06:25s -0:06:25 -
+Rule sol89 1989 only - Jul 23 12:06:25s -0:06:25 -
+Rule sol89 1989 only - Jul 24 12:06:30s -0:06:30 -
+Rule sol89 1989 only - Jul 25 12:06:30s -0:06:30 -
+Rule sol89 1989 only - Jul 26 12:06:30s -0:06:30 -
+Rule sol89 1989 only - Jul 27 12:06:30s -0:06:30 -
+Rule sol89 1989 only - Jul 28 12:06:30s -0:06:30 -
+Rule sol89 1989 only - Jul 29 12:06:25s -0:06:25 -
+Rule sol89 1989 only - Jul 30 12:06:25s -0:06:25 -
+Rule sol89 1989 only - Jul 31 12:06:20s -0:06:20 -
+Rule sol89 1989 only - Aug 1 12:06:20s -0:06:20 -
+Rule sol89 1989 only - Aug 2 12:06:15s -0:06:15 -
+Rule sol89 1989 only - Aug 3 12:06:10s -0:06:10 -
+Rule sol89 1989 only - Aug 4 12:06:05s -0:06:05 -
+Rule sol89 1989 only - Aug 5 12:06:00s -0:06:00 -
+Rule sol89 1989 only - Aug 6 12:05:50s -0:05:50 -
+Rule sol89 1989 only - Aug 7 12:05:45s -0:05:45 -
+Rule sol89 1989 only - Aug 8 12:05:35s -0:05:35 -
+Rule sol89 1989 only - Aug 9 12:05:30s -0:05:30 -
+Rule sol89 1989 only - Aug 10 12:05:20s -0:05:20 -
+Rule sol89 1989 only - Aug 11 12:05:10s -0:05:10 -
+Rule sol89 1989 only - Aug 12 12:05:00s -0:05:00 -
+Rule sol89 1989 only - Aug 13 12:04:50s -0:04:50 -
+Rule sol89 1989 only - Aug 14 12:04:40s -0:04:40 -
+Rule sol89 1989 only - Aug 15 12:04:30s -0:04:30 -
+Rule sol89 1989 only - Aug 16 12:04:15s -0:04:15 -
+Rule sol89 1989 only - Aug 17 12:04:05s -0:04:05 -
+Rule sol89 1989 only - Aug 18 12:03:50s -0:03:50 -
+Rule sol89 1989 only - Aug 19 12:03:35s -0:03:35 -
+Rule sol89 1989 only - Aug 20 12:03:25s -0:03:25 -
+Rule sol89 1989 only - Aug 21 12:03:10s -0:03:10 -
+Rule sol89 1989 only - Aug 22 12:02:55s -0:02:55 -
+Rule sol89 1989 only - Aug 23 12:02:40s -0:02:40 -
+Rule sol89 1989 only - Aug 24 12:02:20s -0:02:20 -
+Rule sol89 1989 only - Aug 25 12:02:05s -0:02:05 -
+Rule sol89 1989 only - Aug 26 12:01:50s -0:01:50 -
+Rule sol89 1989 only - Aug 27 12:01:30s -0:01:30 -
+Rule sol89 1989 only - Aug 28 12:01:15s -0:01:15 -
+Rule sol89 1989 only - Aug 29 12:00:55s -0:00:55 -
+Rule sol89 1989 only - Aug 30 12:00:40s -0:00:40 -
+Rule sol89 1989 only - Aug 31 12:00:20s -0:00:20 -
+Rule sol89 1989 only - Sep 1 12:00:00s 0:00:00 -
+Rule sol89 1989 only - Sep 2 11:59:45s 0:00:15 -
+Rule sol89 1989 only - Sep 3 11:59:25s 0:00:35 -
+Rule sol89 1989 only - Sep 4 11:59:05s 0:00:55 -
+Rule sol89 1989 only - Sep 5 11:58:45s 0:01:15 -
+Rule sol89 1989 only - Sep 6 11:58:25s 0:01:35 -
+Rule sol89 1989 only - Sep 7 11:58:05s 0:01:55 -
+Rule sol89 1989 only - Sep 8 11:57:45s 0:02:15 -
+Rule sol89 1989 only - Sep 9 11:57:20s 0:02:40 -
+Rule sol89 1989 only - Sep 10 11:57:00s 0:03:00 -
+Rule sol89 1989 only - Sep 11 11:56:40s 0:03:20 -
+Rule sol89 1989 only - Sep 12 11:56:20s 0:03:40 -
+Rule sol89 1989 only - Sep 13 11:56:00s 0:04:00 -
+Rule sol89 1989 only - Sep 14 11:55:35s 0:04:25 -
+Rule sol89 1989 only - Sep 15 11:55:15s 0:04:45 -
+Rule sol89 1989 only - Sep 16 11:54:55s 0:05:05 -
+Rule sol89 1989 only - Sep 17 11:54:35s 0:05:25 -
+Rule sol89 1989 only - Sep 18 11:54:10s 0:05:50 -
+Rule sol89 1989 only - Sep 19 11:53:50s 0:06:10 -
+Rule sol89 1989 only - Sep 20 11:53:30s 0:06:30 -
+Rule sol89 1989 only - Sep 21 11:53:10s 0:06:50 -
+Rule sol89 1989 only - Sep 22 11:52:45s 0:07:15 -
+Rule sol89 1989 only - Sep 23 11:52:25s 0:07:35 -
+Rule sol89 1989 only - Sep 24 11:52:05s 0:07:55 -
+Rule sol89 1989 only - Sep 25 11:51:45s 0:08:15 -
+Rule sol89 1989 only - Sep 26 11:51:25s 0:08:35 -
+Rule sol89 1989 only - Sep 27 11:51:05s 0:08:55 -
+Rule sol89 1989 only - Sep 28 11:50:40s 0:09:20 -
+Rule sol89 1989 only - Sep 29 11:50:20s 0:09:40 -
+Rule sol89 1989 only - Sep 30 11:50:00s 0:10:00 -
+Rule sol89 1989 only - Oct 1 11:49:45s 0:10:15 -
+Rule sol89 1989 only - Oct 2 11:49:25s 0:10:35 -
+Rule sol89 1989 only - Oct 3 11:49:05s 0:10:55 -
+Rule sol89 1989 only - Oct 4 11:48:45s 0:11:15 -
+Rule sol89 1989 only - Oct 5 11:48:30s 0:11:30 -
+Rule sol89 1989 only - Oct 6 11:48:10s 0:11:50 -
+Rule sol89 1989 only - Oct 7 11:47:50s 0:12:10 -
+Rule sol89 1989 only - Oct 8 11:47:35s 0:12:25 -
+Rule sol89 1989 only - Oct 9 11:47:20s 0:12:40 -
+Rule sol89 1989 only - Oct 10 11:47:00s 0:13:00 -
+Rule sol89 1989 only - Oct 11 11:46:45s 0:13:15 -
+Rule sol89 1989 only - Oct 12 11:46:30s 0:13:30 -
+Rule sol89 1989 only - Oct 13 11:46:15s 0:13:45 -
+Rule sol89 1989 only - Oct 14 11:46:00s 0:14:00 -
+Rule sol89 1989 only - Oct 15 11:45:50s 0:14:10 -
+Rule sol89 1989 only - Oct 16 11:45:35s 0:14:25 -
+Rule sol89 1989 only - Oct 17 11:45:20s 0:14:40 -
+Rule sol89 1989 only - Oct 18 11:45:10s 0:14:50 -
+Rule sol89 1989 only - Oct 19 11:45:00s 0:15:00 -
+Rule sol89 1989 only - Oct 20 11:44:50s 0:15:10 -
+Rule sol89 1989 only - Oct 21 11:44:40s 0:15:20 -
+Rule sol89 1989 only - Oct 22 11:44:30s 0:15:30 -
+Rule sol89 1989 only - Oct 23 11:44:20s 0:15:40 -
+Rule sol89 1989 only - Oct 24 11:44:10s 0:15:50 -
+Rule sol89 1989 only - Oct 25 11:44:05s 0:15:55 -
+Rule sol89 1989 only - Oct 26 11:44:00s 0:16:00 -
+Rule sol89 1989 only - Oct 27 11:43:50s 0:16:10 -
+Rule sol89 1989 only - Oct 28 11:43:45s 0:16:15 -
+Rule sol89 1989 only - Oct 29 11:43:40s 0:16:20 -
+Rule sol89 1989 only - Oct 30 11:43:40s 0:16:20 -
+Rule sol89 1989 only - Oct 31 11:43:35s 0:16:25 -
+Rule sol89 1989 only - Nov 1 11:43:35s 0:16:25 -
+Rule sol89 1989 only - Nov 2 11:43:35s 0:16:25 -
+Rule sol89 1989 only - Nov 3 11:43:30s 0:16:30 -
+Rule sol89 1989 only - Nov 4 11:43:35s 0:16:25 -
+Rule sol89 1989 only - Nov 5 11:43:35s 0:16:25 -
+Rule sol89 1989 only - Nov 6 11:43:35s 0:16:25 -
+Rule sol89 1989 only - Nov 7 11:43:40s 0:16:20 -
+Rule sol89 1989 only - Nov 8 11:43:45s 0:16:15 -
+Rule sol89 1989 only - Nov 9 11:43:50s 0:16:10 -
+Rule sol89 1989 only - Nov 10 11:43:55s 0:16:05 -
+Rule sol89 1989 only - Nov 11 11:44:00s 0:16:00 -
+Rule sol89 1989 only - Nov 12 11:44:05s 0:15:55 -
+Rule sol89 1989 only - Nov 13 11:44:15s 0:15:45 -
+Rule sol89 1989 only - Nov 14 11:44:25s 0:15:35 -
+Rule sol89 1989 only - Nov 15 11:44:35s 0:15:25 -
+Rule sol89 1989 only - Nov 16 11:44:45s 0:15:15 -
+Rule sol89 1989 only - Nov 17 11:44:55s 0:15:05 -
+Rule sol89 1989 only - Nov 18 11:45:10s 0:14:50 -
+Rule sol89 1989 only - Nov 19 11:45:20s 0:14:40 -
+Rule sol89 1989 only - Nov 20 11:45:35s 0:14:25 -
+Rule sol89 1989 only - Nov 21 11:45:50s 0:14:10 -
+Rule sol89 1989 only - Nov 22 11:46:05s 0:13:55 -
+Rule sol89 1989 only - Nov 23 11:46:25s 0:13:35 -
+Rule sol89 1989 only - Nov 24 11:46:40s 0:13:20 -
+Rule sol89 1989 only - Nov 25 11:47:00s 0:13:00 -
+Rule sol89 1989 only - Nov 26 11:47:20s 0:12:40 -
+Rule sol89 1989 only - Nov 27 11:47:35s 0:12:25 -
+Rule sol89 1989 only - Nov 28 11:47:55s 0:12:05 -
+Rule sol89 1989 only - Nov 29 11:48:20s 0:11:40 -
+Rule sol89 1989 only - Nov 30 11:48:40s 0:11:20 -
+Rule sol89 1989 only - Dec 1 11:49:00s 0:11:00 -
+Rule sol89 1989 only - Dec 2 11:49:25s 0:10:35 -
+Rule sol89 1989 only - Dec 3 11:49:50s 0:10:10 -
+Rule sol89 1989 only - Dec 4 11:50:15s 0:09:45 -
+Rule sol89 1989 only - Dec 5 11:50:35s 0:09:25 -
+Rule sol89 1989 only - Dec 6 11:51:00s 0:09:00 -
+Rule sol89 1989 only - Dec 7 11:51:30s 0:08:30 -
+Rule sol89 1989 only - Dec 8 11:51:55s 0:08:05 -
+Rule sol89 1989 only - Dec 9 11:52:20s 0:07:40 -
+Rule sol89 1989 only - Dec 10 11:52:50s 0:07:10 -
+Rule sol89 1989 only - Dec 11 11:53:15s 0:06:45 -
+Rule sol89 1989 only - Dec 12 11:53:45s 0:06:15 -
+Rule sol89 1989 only - Dec 13 11:54:10s 0:05:50 -
+Rule sol89 1989 only - Dec 14 11:54:40s 0:05:20 -
+Rule sol89 1989 only - Dec 15 11:55:10s 0:04:50 -
+Rule sol89 1989 only - Dec 16 11:55:40s 0:04:20 -
+Rule sol89 1989 only - Dec 17 11:56:05s 0:03:55 -
+Rule sol89 1989 only - Dec 18 11:56:35s 0:03:25 -
+Rule sol89 1989 only - Dec 19 11:57:05s 0:02:55 -
+Rule sol89 1989 only - Dec 20 11:57:35s 0:02:25 -
+Rule sol89 1989 only - Dec 21 11:58:05s 0:01:55 -
+Rule sol89 1989 only - Dec 22 11:58:35s 0:01:25 -
+Rule sol89 1989 only - Dec 23 11:59:05s 0:00:55 -
+Rule sol89 1989 only - Dec 24 11:59:35s 0:00:25 -
+Rule sol89 1989 only - Dec 25 12:00:05s -0:00:05 -
+Rule sol89 1989 only - Dec 26 12:00:35s -0:00:35 -
+Rule sol89 1989 only - Dec 27 12:01:05s -0:01:05 -
+Rule sol89 1989 only - Dec 28 12:01:35s -0:01:35 -
+Rule sol89 1989 only - Dec 29 12:02:00s -0:02:00 -
+Rule sol89 1989 only - Dec 30 12:02:30s -0:02:30 -
+Rule sol89 1989 only - Dec 31 12:03:00s -0:03:00 -
+
+# Riyadh is at about 46 degrees 46 minutes East: 3 hrs, 7 mins, 4 secs
+# 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 - ??
+# For backward compatibility...
+Link Asia/Riyadh89 Mideast/Riyadh89
--- /dev/null
+# @(#)southamerica 7.50
+
+# 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
+
+# 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).
+#
+# Gwillim Law writes that a good source
+# for recent time zone data is the International Air Transport
+# Association's Standard Schedules Information Manual (IATA SSIM),
+# published semiannually. Law sent in several helpful summaries
+# of the IATA's data after 1990.
+#
+# Except where otherwise noted, Shanks is the source for entries through 1990,
+# and IATA SSIM is the source for entries after 1990.
+#
+# Earlier editions of these tables used the North American style (e.g. ARST and
+# ARDT for Argentine Standard and Daylight Time), but the following quote
+# suggests that it's better to use European style (e.g. ART and ARST).
+# I suggest the use of _Summer time_ instead of the more cumbersome
+# _daylight-saving time_. _Summer time_ seems to be in general use
+# in Europe and South America.
+# -- E O Cutler, _New York Times_ (1937-02-14), quoted in
+# H L Mencken, _The American Language: Supplement I_ (1960), p 466
+#
+# Earlier editions of these tables also used the North American style
+# for time zones in Brazil, but this was incorrect, as Brazilians say
+# "summer time". Reinaldo Goulart, a Sao Paulo businessman active in
+# the railroad sector, writes (1999-07-06):
+# The subject of time zones is currently a matter of discussion/debate in
+# Brazil. Let's say that "the Brasilia time" is considered the
+# "official time" because Brasilia is the capital city.
+# The other three time zones are called "Brasilia time "minus one" or
+# "plus one" or "plus two". As far as I know there is no such
+# name/designation as "Eastern Time" or "Central Time".
+# So I invented the following (English-language) abbreviations for now.
+# Corrections are welcome!
+# std dst
+# -2:00 FNT FNST Fernando de Noronha
+# -3:00 BRT BRST Brasilia
+# -4:00 AMT AMST Amazon
+# -5:00 ACT ACST Acre
+
+###############################################################################
+
+###############################################################################
+
+# Argentina
+
+# From Bob Devine (1988-01-28):
+# Argentina: first Sunday in October to first Sunday in April since 1976.
+# Double Summer time from 1969 to 1974. Switches at midnight.
+
+# From U. S. Naval Observatory (1988-01-199):
+# ARGENTINA 3 H BEHIND UTC
+
+# 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.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Arg 1930 only - Dec 1 0:00 1:00 S
+Rule Arg 1931 only - Apr 1 0:00 0 -
+Rule Arg 1931 only - Oct 15 0:00 1:00 S
+Rule Arg 1932 1940 - Mar 1 0:00 0 -
+Rule Arg 1932 1939 - Nov 1 0:00 1:00 S
+Rule Arg 1940 only - Jul 1 0:00 1:00 S
+Rule Arg 1941 only - Jun 15 0:00 0 -
+Rule Arg 1941 only - Oct 15 0:00 1:00 S
+Rule Arg 1943 only - Aug 1 0:00 0 -
+Rule Arg 1943 only - Oct 15 0:00 1:00 S
+Rule Arg 1946 only - Mar 1 0:00 0 -
+Rule Arg 1946 only - Oct 1 0:00 1:00 S
+Rule Arg 1963 only - Oct 1 0:00 0 -
+Rule Arg 1963 only - Dec 15 0:00 1:00 S
+Rule Arg 1964 1966 - Mar 1 0:00 0 -
+Rule Arg 1964 1966 - Oct 15 0:00 1:00 S
+Rule Arg 1967 only - Apr 2 0:00 0 -
+Rule Arg 1967 1968 - Oct Sun>=1 0:00 1:00 S
+Rule Arg 1968 1969 - Apr Sun>=1 0:00 0 -
+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 (1995-06-26):
+# These corrections were contributed by InterSoft Argentina S.A.,
+# obtaining the data from the:
+# Talleres de Hidrografia Naval Argentina
+# (Argentine Naval Hydrography Institute)
+#
+# Shanks stops after 1992-03-01; go with Otero.
+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 (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.
+#
+# From Rives McDow (2000-01-10):
+# On October 3, 1999, 0:00 local, Argentina implemented daylight savings time,
+# which did not result in the switch of a time zone, as they stayed 9 hours
+# from the International Date Line.
+Rule Arg 1999 only - Oct Sun>=1 0:00 1:00 S
+Rule Arg 2000 only - Mar Sun>=1 0:00 0 -
+#
+# From Peter Gradelski via Steffen Thorsen (2000-03-01):
+# We just checked with our Sao Paulo office and they say the government of
+# 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 (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.
+#
+# From Mariano Absatz (2001-06-06):
+# one of the major newspapers here in Argentina said that the 1999
+# Timezone Law (which never was effectively applied) will (would?) be
+# in effect.... The article is at
+# http://ar.clarin.com/diario/2001-06-06/e-01701.htm
+# ... The Law itself is "Ley No 25155", sanctioned on 1999-08-25, enacted
+# 1999-09-17, and published 1999-09-21. The official publication is at:
+# http://www.boletin.jus.gov.ar/BON/Primera/1999/09-Septiembre/21/PDF/BO21-09-99LEG.PDF
+# Regretfully, you have to subscribe (and pay) for the on-line version....
+#
+# (2001-06-12):
+# the timezone for Argentina will not change next Sunday.
+# Apparently it will do so on Sunday 24th....
+# http://ar.clarin.com/diario/2001-06-12/s-03501.htm
+#
+# (2001-06-25):
+# Last Friday (yes, the last working day before the date of the change), the
+# Senate annulled the 1999 law that introduced the changes later postponed.
+# http://www.clarin.com.ar/diario/2001-06-22/s-03601.htm
+# It remains the vote of the Deputies..., but it will be the same....
+# This kind of things had always been done this way in Argentina.
+# We are still -03:00 all year round in all of the country.
+#
+#
+# From Paul Eggert (2002-01-22):
+# Hora de verano para la Republica Argentina (2000-10-01)
+# says that standard time in Argentina from 1894-10-31
+# to 1920-05-01 was -4:16:48.25. Go with this more-precise value
+# over Shanks.
+
+# Unless otherwise specified, data are from Shanks through 1992, from
+# the IATA otherwise. As noted below, Shanks says that
+# America/Cordoba split into 7 subregions during 1991/1992, but we
+# haven't verified this yet so for now we'll keep it a single region.
+#
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+#
+# Buenos Aires (BA), Capital Federal (CF), Santa Cruz (SC),
+# Tierra del Fuego, Antartida e Islas del Atlantico Sur (TF)
+Zone America/Buenos_Aires -3:53:48 - LMT 1894 Oct 31
+ -4:16:48 - CMT 1920 May # Cordoba Mean Time
+ -4:00 - ART 1930 Dec
+ -4:00 Arg AR%sT 1969 Oct 5
+ -3:00 Arg AR%sT 1999 Oct 3
+ -4:00 Arg AR%sT 2000 Mar 3
+ -3:00 - ART
+#
+# Santa Fe (SF), Entre Rios (ER), Corrientes (CN), Misiones (MN), Chaco (CC),
+# Formosa (FM), Salta (SA), Tucuman (TM), Santiago del Estero (SE),
+# Cordoba (CB), La Rioja (LR), San Juan (SJ), San Luis (SL), La Pampa (LP),
+# Neuquen (NQ), Rio Negro (RN), Chubut (CH)
+#
+# Shanks also makes the following claims, which we haven't verified:
+# - Formosa switched to -3:00 on 1991-01-07.
+# - La Rioja and San Juan switched to -4:00 on 1991-03-01
+# and then to -3:00 on 1991-05-07.
+# - Misiones switched to -3:00 on 1990-12-29.
+# - Chaco switched to -3:00 on 1991-01-04.
+# - San Luis switched to -4:00 on 1990-03-14, then to -3:00 on 1990-10-15,
+# then to -4:00 on 1991-03-01, then to -3:00 on 1991-06-01.
+# - Santiago del Estero switched to -4:00 on 1991-04-01,
+# then to -3:00 on 1991-04-26.
+# If we need to add Zones for these areas, we may need to have a subdirectory
+# for Argentina, as e.g. "America/San_Luis" is too ambiguious.
+#
+Zone America/Cordoba -4:16:48 - 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
+#
+# Jujuy (JY)
+Zone America/Jujuy -4:21:12 - 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 1990 Mar 4
+ -4:00 - WART 1990 Oct 28
+ -4:00 1:00 WARST 1991 Mar 17
+ -4:00 - WART 1991 Oct 6
+ -3:00 1:00 ARST 1992
+ -3:00 Arg AR%sT 1999 Oct 3
+ -4:00 Arg AR%sT 2000 Mar 3
+ -3:00 - ART
+#
+# Catamarca (CT)
+Zone America/Catamarca -4:23:08 - 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
+#
+# Mendoza (MZ)
+Zone America/Mendoza -4:35:16 - 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 1990 Mar 4
+ -4:00 - WART 1990 Oct 15
+ -4:00 1:00 WARST 1991 Mar 1
+ -4:00 - WART 1991 Oct 15
+ -4:00 1:00 WARST 1992 Mar 1
+ -4:00 - WART 1992 Oct 18
+ -3:00 Arg AR%sT 1999 Oct 3
+ -4:00 Arg AR%sT 2000 Mar 3
+ -3:00 - ART
+
+# Aruba
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Aruba -4:40:24 - LMT 1912 Feb 12 # Oranjestad
+ -4:30 - ANT 1965 # Netherlands Antilles Time
+ -4:00 - AST
+
+# Bolivia
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/La_Paz -4:32:36 - LMT 1890
+ -4:32:36 - CMT 1931 Oct 15 # Calamarca MT
+ -4:32:36 1:00 BOST 1932 Mar 21 # Bolivia ST
+ -4:00 - BOT # Bolivia Time
+
+# Brazil
+
+# 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;
+# the federal government refused to follow the city's rules, and business
+# was in a chaos, so the mayor backed down that afternoon.
+
+# From IATA SSIM (1996-02):
+# _Only_ the following states in BR1 observe DST: Rio Grande do Sul (RS),
+# Santa Catarina (SC), Parana (PR), Sao Paulo (SP), Rio de Janeiro (RJ),
+# Espirito Santo (ES), Minas Gerais (MG), Bahia (BA), Goias (GO),
+# Distrito Federal (DF), Tocantins (TO), Sergipe [SE] and Alagoas [AL].
+# [The last three states are new to this issue of the IATA SSIM.]
+
+# From Gwillim Law (1996-10-07):
+# Geography, history (Tocantins was part of Goias until 1989), and other
+# sources of time zone information lead me to believe that AL, SE, and TO were
+# always in BR1, and so the only change was whether or not they observed DST....
+# The earliest issue of the SSIM I have is 2/91. Each issue from then until
+# 9/95 says that DST is observed only in the ten states I quoted from 9/95,
+# along with Mato Grosso (MT) and Mato Grosso do Sul (MS), which are in BR2
+# (UTC-4).... The other two time zones given for Brazil are BR3, which is
+# UTC-5, no DST, and applies only in the state of Acre (AC); and BR4, which is
+# UTC-2, and applies to Fernando de Noronha (formerly FN, but I believe it's
+# become part of the state of Pernambuco). The boundary between BR1 and BR2
+# has never been clearly stated. They've simply been called East and West.
+# However, some conclusions can be drawn from another IATA manual: the Airline
+# Coding Directory, which lists close to 400 airports in Brazil. For each
+# airport it gives a time zone which is coded to the SSIM. From that
+# information, I'm led to conclude that the states of Amapa (AP), Ceara (CE),
+# Maranhao (MA), Paraiba (PR), Pernambuco (PE), Piaui (PI), and Rio Grande do
+# Norte (RN), and the eastern part of Para (PA) are all in BR1 without DST.
+
+# From Marcos Tadeu (1998-09-27):
+# Brazilian official page
+#
+
+# From Jesper Norgaard (2000-11-03):
+# [For an official list of which regions in Brazil use which time zones, see:]
+# http://pcdsh01.on.br/Fusbr.htm
+# http://pcdsh01.on.br/Fusbrhv.htm
+
+# From Celso Doria via David Madeo (2002-10-09):
+# The reason for the delay this year has to do with elections in Brazil.
+#
+# Unlike in the United States, elections in Brazil are 100% computerized and
+# the results are known almost immediately. Yesterday, it was the first
+# round of the elections when 115 million Brazilians voted for President,
+# Governor, Senators, Federal Deputies, and State Deputies. Nobody is
+# counting (or re-counting) votes anymore and we know there will be a second
+# round for the Presidency and also for some Governors. The 2nd round will
+# take place on October 27th.
+#
+# The reason why the DST will only begin November 3rd is that the thousands
+# of electoral machines used cannot have their time changed, and since the
+# Constitution says the elections must begin at 8:00 AM and end at 5:00 PM,
+# the Government decided to postpone DST, instead of changing the Constitution
+# (maybe, for the next elections, it will be possible to change the clock)...
+
+# From Paul Eggert (2002-10-10):
+# The official decrees referenced below are mostly taken from
+# Decretos sobre o Horario de Verao no Brasil
+# (2001-09-20, in Portuguese).
+# The official site for all decrees, including those not related to time, is
+# Presidencia da Republica, Subchefia para Assuntos Juridicos, Decretos
+# (in Portuguese).
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Brazil 1931 only - Oct 3 11:00 1:00 S
+Rule Brazil 1932 1933 - Apr 1 0:00 0 -
+Rule Brazil 1932 only - Oct 3 0:00 1:00 S
+# revoked DST.
+Rule Brazil 1949 1952 - Dec 1 0:00 1:00 S
+Rule Brazil 1950 only - Apr 16 1:00 0 -
+Rule Brazil 1951 1952 - Apr 1 0:00 0 -
+Rule Brazil 1953 only - Mar 1 0:00 0 -
+# revoked DST.
+# established DST from 1963-10-23 00:00 to 1964-02-29 00:00
+# in SP, RJ, GB, MG, ES, due to the prolongation of the drought.
+# extended the above decree to all of the national territory on 12-09.
+Rule Brazil 1963 only - Dec 9 0:00 1:00 S
+# extended summer time by one day to 1964-03-01 00:00 (start of school).
+Rule Brazil 1964 only - Mar 1 0:00 0 -
+Rule Brazil 1965 only - Jan 31 0:00 1:00 S
+Rule Brazil 1965 only - Mar 31 0:00 0 -
+Rule Brazil 1965 only - Dec 1 0:00 1:00 S
+Rule Brazil 1966 1968 - Mar 1 0:00 0 -
+Rule Brazil 1966 1967 - Nov 1 0:00 1:00 S
+# revoked DST.
+Rule Brazil 1985 only - Nov 2 0:00 1:00 S
+# Decree 92,310 (1986-01-21)
+# Decree 92,463 (1986-03-13)
+Rule Brazil 1986 only - Mar 15 0:00 0 -
+# Decree 93,316 (1986-10-01)
+Rule Brazil 1986 only - Oct 25 0:00 1:00 S
+Rule Brazil 1987 only - Feb 14 0:00 0 -
+Rule Brazil 1987 only - Oct 25 0:00 1:00 S
+Rule Brazil 1988 only - Feb 7 0:00 0 -
+# except for the states of AC, AM, PA, RR, RO, and AP (then a territory)
+Rule Brazil 1988 only - Oct 16 0:00 1:00 S
+Rule Brazil 1989 only - Jan 29 0:00 0 -
+# with the same exceptions
+Rule Brazil 1989 only - Oct 15 0:00 1:00 S
+Rule Brazil 1990 only - Feb 11 0:00 0 -
+# adopted by RS, SC, PR, SP, RJ, ES, MG, GO, MS, DF.
+# Decree 99,629 (1990-10-19) adds BA, MT.
+Rule Brazil 1990 only - Oct 21 0:00 1:00 S
+Rule Brazil 1991 only - Feb 17 0:00 0 -
+# adopted by RS, SC, PR, SP, RJ, ES, MG, BA, GO, MT, MS, DF.
+Rule Brazil 1991 only - Oct 20 0:00 1:00 S
+Rule Brazil 1992 only - Feb 9 0:00 0 -
+# adopted by same states.
+Rule Brazil 1992 only - Oct 25 0:00 1:00 S
+Rule Brazil 1993 only - Jan 31 0:00 0 -
+# Decree
942 (1993-09-28)
+# adopted by same states, plus AM.
+# Decree
1,252 (1994-09-22)
+# adopted by same states, minus AM and MT.
+# Decree
1,636 (1995-09-14)
+# adopted by same states, plus MT and TO.
+# Decree
1,674 (1995-10-13)
+# adds AL, SE.
+Rule Brazil 1993 1995 - Oct Sun>=11 0:00 1:00 S
+Rule Brazil 1994 1995 - Feb Sun>=15 0:00 0 -
+Rule Brazil 1996 only - Feb 11 0:00 0 -
+# Decree
2,000 (1996-09-04)
+# 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 (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):
+# Brazil Prepares for Papal Visit
+# ,
+# 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
+# (1998-02-10)
+Rule Brazil 1998 only - Mar 1 0:00 0 -
+# Decree
2,780 (1998-09-11)
+# adopted by the same states as before.
+Rule Brazil 1998 only - Oct 11 0:00 1:00 S
+Rule Brazil 1999 only - Feb 21 0:00 0 -
+# (1999-08-23) adopted by same states.
+# Decree
3,188 (1999-09-30)
+# adds SE, AL, PB, PE, RN, CE, PI, MA and RR.
+Rule Brazil 1999 only - Oct 3 0:00 1:00 S
+Rule Brazil 2000 only - Feb 27 0:00 0 -
+# Decree
3,592 (2000-09-06)
+# adopted by the same states as before.
+# Decree
3,630 (2000-10-13)
+# repeals DST in PE and RR, effective 2000-10-15 00:00.
+# Decree
3,632 (2000-10-17)
+# repeals DST in SE, AL, PB, RN, CE, PI and MA, effective 2000-10-22 00:00.
+# (2001-09-13) reestablishes DST in AL, CE, MA, PB, PE, PI, RN, SE.
+Rule Brazil 2000 2001 - Oct Sun>=8 0:00 1:00 S
+Rule Brazil 2001 max - Feb Sun>=15 0:00 0 -
+# Decree 4,399 (2002-10-01) repeals DST in AL, CE, MA, PB, PE, PI, RN, SE.
+Rule Brazil 2002 only - Nov 3 0:00 1:00 S
+# Decree 4,844 (2003-09-24; corrected 2003-09-26) repeals DST in BA, MT, TO.
+Rule Brazil 2003 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, PR, RJ, RS, SC, SP.
+#
+# For dates after mid-2004, the above rules with TO="max" are guesses
+# and are quite possibly wrong, but are more likely than no DST at all.
+
+
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+#
+# Fernando de Noronha (administratively part of PE)
+Zone America/Noronha -2:09:40 - LMT 1914
+ -2:00 Brazil FN%sT 1990 Sep 17
+ -2:00 - FNT 1999 Sep 30
+ -2:00 Brazil FN%sT 2000 Oct 15
+ -2:00 - FNT 2001 Sep 13
+ -2:00 Brazil FN%sT 2002 Oct 1
+ -2:00 - FNT
+# Other Atlantic islands have no permanent settlement.
+# These include Trindade and Martin Vaz (administratively part of ES),
+# Atol das Rocas (RN), and Penedos de Sao Pedro e Sao Paulo (PE).
+# Fernando de Noronha was a separate territory from 1942-09-02 to 1989-01-01;
+# it also included the Penedos.
+#
+# Amapa (AP), east Para (PA)
+# East Para includes Belem, Maraba, Serra Norte, and Sao Felix do Xingu.
+# The division between east and west Para is the river Xingu.
+# In the north a very small part from the river Javary (now Jari I guess,
+# the border with Amapa) to the Amazon, then to the Xingu.
+Zone America/Belem -3:13:56 - LMT 1914
+ -3:00 Brazil BR%sT 1988 Sep 12
+ -3:00 - BRT
+#
+# Maranhao (MA), Piaui (PI), Ceara (CE), Rio Grande do Norte (RN),
+# Paraiba (PB)
+Zone America/Fortaleza -2:34:00 - LMT 1914
+ -3:00 Brazil BR%sT 1990 Sep 17
+ -3:00 - BRT 1999 Sep 30
+ -3:00 Brazil BR%sT 2000 Oct 22
+ -3:00 - BRT 2001 Sep 13
+ -3:00 Brazil BR%sT 2002 Oct 1
+ -3:00 - BRT
+#
+# Pernambuco (PE) (except Atlantic islands)
+Zone America/Recife -2:19:36 - LMT 1914
+ -3:00 Brazil BR%sT 1990 Sep 17
+ -3:00 - BRT 1999 Sep 30
+ -3:00 Brazil BR%sT 2000 Oct 15
+ -3:00 - BRT 2001 Sep 13
+ -3:00 Brazil BR%sT 2002 Oct 1
+ -3:00 - BRT
+#
+# Tocantins (TO)
+Zone America/Araguaina -3:12:48 - LMT 1914
+ -3:00 Brazil BR%sT 1990 Sep 17
+ -3:00 - BRT 1995 Sep 14
+ -3:00 Brazil BR%sT 2003 Sep 24
+ -3:00 - BRT
+#
+# Alagoas (AL), Sergipe (SE)
+Zone America/Maceio -2:22:52 - LMT 1914
+ -3:00 Brazil BR%sT 1990 Sep 17
+ -3:00 - BRT 1995 Oct 13
+ -3:00 Brazil BR%sT 1996 Sep 4
+ -3:00 - BRT 1999 Sep 30
+ -3:00 Brazil BR%sT 2000 Oct 22
+ -3:00 - BRT 2001 Sep 13
+ -3:00 Brazil BR%sT 2002 Oct 1
+ -3:00 - BRT
+#
+# Bahia (BA)
+# There are too many Salvadors elsewhere, so use America/Bahia instead
+# of America/Salvador.
+Zone America/Bahia -2:34:04 - LMT 1914
+ -3:00 Brazil BR%sT 2003 Sep 24
+ -3:00 - BRT
+#
+# Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
+# Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),
+# Santa Catarina (SC), Rio Grande do Sul (RS)
+Zone America/Sao_Paulo -3:06:28 - LMT 1914
+ -3:00 Brazil BR%sT 1963 Oct 23 00:00
+ -3:00 1:00 BRST 1964
+ -3:00 Brazil BR%sT
+#
+# Mato Grosso do Sul (MS)
+Zone America/Campo_Grande -3:38:28 - LMT 1914
+ -4:00 Brazil AM%sT
+#
+# Mato Grosso (MT)
+Zone America/Cuiaba -3:44:20 - LMT 1914
+ -4:00 Brazil AM%sT 1994 Sep 22
+ -4:00 - AMT 1995 Sep 14
+ -4:00 Brazil AM%sT 2003 Sep 24
+ -4:00 - AMT
+#
+# west Para (PA), Rondonia (RO)
+# West Para includes Altamira, Oribidos, Prainha, Oriximina, and Santarem.
+Zone America/Porto_Velho -4:15:36 - LMT 1914
+ -4:00 Brazil AM%sT 1988 Sep 12
+ -4:00 - AMT
+#
+# Roraima (RR)
+Zone America/Boa_Vista -4:02:40 - LMT 1914
+ -4:00 Brazil AM%sT 1988 Sep 12
+ -4:00 - AMT 1999 Sep 30
+ -4:00 Brazil AM%sT 2000 Oct 15
+ -4:00 - AMT
+#
+# east Amazonas (AM): Boca do Acre, Jutai, Manaus, Floriano Peixoto
+# The great circle line from Tabatinga to Porto Acre divides
+# east from west Amazonas.
+Zone America/Manaus -4:00:04 - LMT 1914
+ -4:00 Brazil AM%sT 1988 Sep 12
+ -4:00 - AMT 1993 Sep 28
+ -4:00 Brazil AM%sT 1994 Sep 22
+ -4:00 - AMT
+#
+# west Amazonas (AM): Atalaia do Norte, Boca do Maoco, Benjamin Constant,
+# Eirunepe, Envira, Ipixuna
+Zone America/Eirunepe -4:39:28 - LMT 1914
+ -5:00 Brazil AC%sT 1988 Sep 12
+ -5:00 - ACT 1993 Sep 28
+ -5:00 Brazil AC%sT 1994 Sep 22
+ -5:00 - ACT
+#
+# Acre (AC)
+Zone America/Rio_Branco -4:31:12 - LMT 1914
+ -5:00 Brazil AC%sT 1988 Sep 12
+ -5:00 - ACT
+
+
+# Chile
+
+# From Eduardo Krell (1995-10-19):
+# The law says to switch to DST at midnight [24:00] on the second SATURDAY
+# of October.... The law is the same for March and October.
+# (1998-09-29):
+# Because of the drought this year, the government decided to go into
+# DST earlier (saturday 9/26 at 24:00). This is a one-time change only ...
+# (unless there's another dry season next year, I guess).
+
+# From Julio I. Pacheco Troncoso (1999-03-18):
+# Because of the same drought, the government decided to end DST later,
+# on April 3, (one-time change).
+
+# From Gwillim Law (2001-05-04):
+# I came across another article in "La Tercera" about Chilean DST.
+#
+# It clearly confirms my earlier suggestion, that DST begins at 22:00
+# on Easter Island.... But it also seems to be saying that the
+# observance of DST in Chile began in 1966, rather than 1969 as
+# ... [Shanks] has it....
+#
+# My translation:
+#
+# "The Chilean Army has announced that summer time will begin tomorrow,
+# Saturday, October 14 in continental Chile, insular Chile, and
+# Antarctica, as provided by Supreme Decree 25 of January 11, 1966.
+# By the preceding, official time in continental Chile and Chilean
+# Antarctic, and official time in Western Insular Chile, which applies
+# to Easter Island and Sala y Gomez Island, will be set forward at
+# midnight and at 22:00, respectively, by 20 minutes."
+
+# From Paul Eggert (2001-05-04):
+# Go with this article in preference to Shanks's 1969 date for modern DST.
+# Assume this rule has been used since DST was introduced in the islands.
+
+# From Paul Eggert (2002-10-24):
+# gives many details that
+# disagree with the following table, but we haven't had time to compare them.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Chile 1918 only - Sep 1 0:00 1:00 S
+Rule Chile 1919 only - Jul 2 0:00 0 -
+Rule Chile 1927 1931 - Sep 1 0:00 1:00 S
+Rule Chile 1928 1932 - Apr 1 0:00 0 -
+Rule Chile 1966 1997 - Oct Sun>=9 4:00u 1:00 S
+Rule Chile 1967 1998 - Mar Sun>=9 3:00u 0 -
+Rule Chile 1998 only - Sep 27 4:00u 1:00 S
+Rule Chile 1999 only - Apr 4 3:00u 0 -
+Rule Chile 1999 max - Oct Sun>=9 4:00u 1:00 S
+Rule Chile 2000 max - Mar Sun>=9 3:00u 0 -
+# IATA SSIM anomalies: (1990-09) says 1990-09-16; (1992-02) says 1992-03-14;
+# (1996-09) says 1998-03-08. Ignore these.
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Santiago -4:42:40 - LMT 1890
+ -4:42:40 - SMT 1910 # Santiago Mean Time
+ -5:00 Chile CL%sT 1932 Sep # Chile Time
+ -4:00 Chile CL%sT
+Zone Pacific/Easter -7:17:28 - LMT 1890 # Mataveri
+ -7:17:28 - MMT 1932 Sep # Mataveri Mean Time
+ -7:00 Chile EAS%sT 1982 Mar 14 # Easter I Time
+ -6:00 Chile EAS%sT
+#
+# Sala y Gomez Island is like Pacific/Easter.
+# Other Chilean locations, including Juan Fernandez Is, San Ambrosio,
+# San Felix, and Antarctic bases, are like America/Santiago.
+
+# Colombia
+# Shanks specifies 24:00 for 1992 transition times; go with IATA,
+# as it seems implausible to change clocks at midnight New Year's Eve.
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule CO 1992 only - May 2 0:00 1:00 S
+Rule CO 1992 only - Dec 31 0:00 0 -
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Bogota -4:56:20 - LMT 1884 Mar 13
+ -4:56:20 - BMT 1914 Nov 23 # Bogota Mean Time
+ -5:00 CO CO%sT # Colombia Time
+# Malpelo, Providencia, San Andres
+# no information; probably like America/Bogota
+
+# Curacao
+# Shanks says that Bottom and Oranjestad have been at -4:00 since
+# standard time was introduced on 1912-03-02; and that Kralendijk and Rincon
+# used Kralendijk Mean Time (-4:33:08) from 1912-02-02 to 1965-01-01.
+# This all predates our 1970 cutoff, though.
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Curacao -4:35:44 - LMT 1912 Feb 12 # Willemstad
+ -4:30 - ANT 1965 # Netherlands Antilles Time
+ -4:00 - AST
+
+# Ecuador
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Guayaquil -5:19:20 - LMT 1890
+ -5:14:00 - QMT 1931 # Quito Mean Time
+ -5:00 - ECT # Ecuador Time
+Zone Pacific/Galapagos -5:58:24 - LMT 1931 # Puerto Baquerizo Moreno
+ -5:00 - ECT 1986
+ -6:00 - GALT # Galapagos Time
+
+# Falklands
+
+# From Paul Eggert (2001-03-05):
+# Between 1990 and 2000 inclusive, Shanks and the IATA agree except
+# the IATA gives 1996-09-08. Go with Shanks.
+
+# From Falkland Islands Government Office, London (2001-01-22)
+# via Jesper Norgaard:
+# ... the clocks revert back to Local Mean Time at 2 am on Sunday 15
+# April 2001 and advance one hour to summer time at 2 am on Sunday 2
+# September. It is anticipated that the clocks will revert back at 2
+# am on Sunday 21 April 2002 and advance to summer time at 2 am on
+# Sunday 1 September.
+
+# From Rives McDow (2001-02-13):
+#
+# I have communicated several times with people there, and the last
+# time I had communications that was helpful was in 1998. Here is
+# what was said then:
+#
+# "The general rule was that Stanley used daylight saving and the Camp
+# did not. However for various reasons many people in the Camp have
+# started to use daylight saving (known locally as 'Stanley Time')
+# There is no rule as to who uses daylight saving - it is a matter of
+# personal choice and so it is impossible to draw a map showing who
+# uses it and who does not. Any list would be out of date as soon as
+# it was produced. This year daylight saving ended on April 18/19th
+# and started again on September 12/13th. I do not know what the rule
+# is, but can find out if you like. We do not change at the same time
+# as UK or Chile."
+#
+# I did have in my notes that the rule was "Second Saturday in Sep at
+# 0:00 until third Saturday in Apr at 0:00". I think that this does
+# not agree in some cases with Shanks; is this true?
+#
+# Also, there is no mention in the list that some areas in the
+# Falklands do not use DST. I have found in my communications there
+# that these areas are on the western half of East Falkland and all of
+# West Falkland. Stanley is the only place that consistently observes
+# DST. Again, as in other places in the world, the farmers don't like
+# it. West Falkland is almost entirely sheep farmers.
+#
+# I know one lady there that keeps a list of which farm keeps DST and
+# which doesn't each year. She runs a shop in Stanley, and says that
+# the list changes each year. She uses it to communicate to her
+# customers, catching them when they are home for lunch or dinner.
+
+# From Paul Eggert (2001-03-05):
+# For now, we'll just record the time in Stanley, since we have no
+# better info.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Falk 1937 1938 - Sep lastSun 0:00 1:00 S
+Rule Falk 1938 1942 - Mar Sun>=19 0:00 0 -
+Rule Falk 1939 only - Oct 1 0:00 1:00 S
+Rule Falk 1940 1942 - Sep lastSun 0:00 1:00 S
+Rule Falk 1943 only - Jan 1 0:00 0 -
+Rule Falk 1983 only - Sep lastSun 0:00 1:00 S
+Rule Falk 1984 1985 - Apr lastSun 0:00 0 -
+Rule Falk 1984 only - Sep 16 0:00 1:00 S
+Rule Falk 1985 2000 - Sep Sun>=9 0:00 1:00 S
+Rule Falk 1986 2000 - Apr Sun>=16 0:00 0 -
+Rule Falk 2001 max - Apr Sun>=15 2:00 0 -
+Rule Falk 2001 max - Sep Sun>=1 2:00 1:00 S
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone Atlantic/Stanley -3:51:24 - LMT 1890
+ -3:51:24 - SMT 1912 Mar 12 # Stanley Mean Time
+ -4:00 Falk FK%sT 1983 May # Falkland Is Time
+ -3:00 Falk FK%sT 1985 Sep 15
+ -4:00 Falk FK%sT
+
+# French Guiana
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Cayenne -3:29:20 - LMT 1911 Jul
+ -4:00 - GFT 1967 Oct # French Guiana Time
+ -3:00 - GFT
+
+# Guyana
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Guyana -3:52:40 - LMT 1915 Mar # Georgetown
+ -3:45 - GBGT 1966 May 26 # Br Guiana Time
+ -3:45 - GYT 1975 Jul 31 # Guyana Time
+ -3:00 - GYT 1991
+# IATA SSIM (1996-06) says -4:00. Assume a 1991 switch.
+ -4:00 - GYT
+
+# Paraguay
+# From Paul Eggert (1999-10-29):
+# Shanks (1999) says that spring transitions are from 01:00 -> 02:00,
+# and autumn transitions are from 00:00 -> 23:00. Go with earlier
+# editions of Shanks, and with the IATA, who say transitions occur at 00:00.
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Para 1975 1988 - Oct 1 0:00 1:00 S
+Rule Para 1975 1978 - Mar 1 0:00 0 -
+Rule Para 1979 1991 - Apr 1 0:00 0 -
+Rule Para 1989 only - Oct 22 0:00 1:00 S
+Rule Para 1990 only - Oct 1 0:00 1:00 S
+Rule Para 1991 only - Oct 6 0:00 1:00 S
+Rule Para 1992 only - Mar 1 0:00 0 -
+Rule Para 1992 only - Oct 5 0:00 1:00 S
+Rule Para 1993 only - Mar 31 0:00 0 -
+Rule Para 1993 1995 - Oct 1 0:00 1:00 S
+Rule Para 1994 1995 - Feb lastSun 0:00 0 -
+Rule Para 1996 only - Mar 1 0:00 0 -
+# IATA SSIM (2000-02) says 1999-10-10; ignore this for now.
+# From Steffen Thorsen (2000-10-02):
+# I have three independent reports that Paraguay changed to DST this Sunday
+# (10-01).
+#
+# Translated by Gwillim Law (2001-02-27) from
+# Noticias, a daily paper in Asuncion, Paraguay (2000-10-01)
+# :
+# Starting at 0:00 today, the clock will be set forward 60 minutes, in
+# fulfillment of Decree No. 7,273 of the Executive Power.... The time change
+# system has been operating for several years. Formerly there was a separate
+# decree each year; the new law has the same effect, but permanently. Every
+# year, the time will change on the first Sunday of October; likewise, the
+# clock will be set back on the first Sunday of March.
+#
+# From Jesper Norgaard (2001-03-06) [an official URL saying similar things]:
+# http://gateway.abc.com.py:8000/pub/pag04.mbr/artic?FHA=2001-03-03-02.24.52.900592
+#
+Rule Para 1996 2001 - Oct Sun>=1 0:00 1:00 S
+# IATA SSIM (1997-09) says Mar 1; go with Shanks.
+Rule Para 1997 only - Feb lastSun 0:00 0 -
+# Shanks says 1999-02-28; IATA SSIM (1999-02) says 1999-02-27, but
+# (1999-09) reports no date; go with above sources and Gerd Knops (2001-02-27).
+Rule Para 1998 2001 - Mar Sun>=1 0:00 0 -
+# From Rives McDow (2002-02-28):
+# 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
+
+
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Asuncion -3:50:40 - LMT 1890
+ -3:50:40 - AMT 1931 Oct 10 # Asuncion Mean Time
+ -4:00 - PYT 1972 Oct # Paraguay Time
+ -3:00 - PYT 1974 Apr
+ -4:00 Para PY%sT
+
+# Peru
+#
+# From Evelyn C. Leeper via Mark Brader (2003-10-26):
+# 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):
+# Shanks doesn't have this transition. Assume 1986 was like 1987.
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Peru 1938 only - Jan 1 0:00 1:00 S
+Rule Peru 1938 only - Apr 1 0:00 0 -
+Rule Peru 1938 1939 - Sep lastSun 0:00 1:00 S
+Rule Peru 1939 1940 - Mar Sun>=24 0:00 0 -
+Rule Peru 1986 1987 - Jan 1 0:00 1:00 S
+Rule Peru 1986 1987 - Apr 1 0:00 0 -
+Rule Peru 1990 only - Jan 1 0:00 1:00 S
+Rule Peru 1990 only - Apr 1 0:00 0 -
+# IATA is ambiguous for 1993/1995; go with Shanks.
+Rule Peru 1994 only - Jan 1 0:00 1:00 S
+Rule Peru 1994 only - Apr 1 0:00 0 -
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Lima -5:08:12 - LMT 1890
+ -5:08:36 - LMT 1908 Jul 28 # Lima Mean Time?
+ -5:00 Peru PE%sT # Peru Time
+
+# South Georgia
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone Atlantic/South_Georgia -2:26:08 - LMT 1890 # Grytviken
+ -2:00 - GST # South Georgia Time
+
+# South Sandwich Is
+# uninhabited; scientific personnel have wintered
+
+# Suriname
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Paramaribo -3:40:40 - LMT 1911
+ -3:40:52 - PMT 1935 # Paramaribo Mean Time
+ -3:40:36 - PMT 1945 Oct # The capital moved?
+ -3:30 - NEGT 1975 Nov 20 # Dutch Guiana Time
+ -3:30 - SRT 1984 Oct # Suriname Time
+ -3:00 - SRT
+
+# Trinidad and Tobago
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2
+ -4:00 - AST
+
+# Uruguay
+# 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
+# Whitman gives 1923 Oct 1; go with Shanks.
+Rule Uruguay 1923 only - Oct 2 0:00 0:30 HS
+Rule Uruguay 1924 1926 - Apr 1 0:00 0 -
+Rule Uruguay 1924 1925 - Oct 1 0:00 0:30 HS
+Rule Uruguay 1933 1935 - Oct lastSun 0:00 0:30 HS
+# Shanks gives 1935 Apr 1 0:00 and 1936 Mar 30 0:00; go with Whitman.
+Rule Uruguay 1934 1936 - Mar Sat>=25 23:30s 0 -
+Rule Uruguay 1936 only - Nov 1 0:00 0:30 HS
+Rule Uruguay 1937 1941 - Mar lastSun 0:00 0 -
+# Whitman gives 1937 Oct 3; go with Shanks.
+Rule Uruguay 1937 1940 - Oct lastSun 0:00 0:30 HS
+# Whitman gives 1941 Oct 24 - 1942 Mar 27, 1942 Dec 14 - 1943 Apr 13,
+# and 1943 Apr 13 ``to present time''; go with Shanks.
+Rule Uruguay 1941 only - Aug 1 0:00 0 -
+Rule Uruguay 1942 only - Jan 1 0:00 0:30 HS
+Rule Uruguay 1942 only - Dec 14 0:00 1:00 S
+Rule Uruguay 1943 only - Mar 14 0:00 0 -
+Rule Uruguay 1959 only - May 24 0:00 1:00 S
+Rule Uruguay 1959 only - Nov 15 0:00 0 -
+Rule Uruguay 1960 only - Jan 17 0:00 1:00 S
+Rule Uruguay 1960 only - Mar 6 0:00 0 -
+Rule Uruguay 1965 1967 - Apr Sun>=1 0:00 1:00 S
+Rule Uruguay 1965 only - Sep 26 0:00 0 -
+Rule Uruguay 1966 1967 - Oct 31 0:00 0 -
+Rule Uruguay 1968 1970 - May 27 0:00 0:30 HS
+Rule Uruguay 1968 1970 - Dec 2 0:00 0 -
+Rule Uruguay 1972 only - Apr 24 0:00 1:00 S
+Rule Uruguay 1972 only - Aug 15 0:00 0 -
+Rule Uruguay 1974 only - Mar 10 0:00 0:30 HS
+Rule Uruguay 1974 only - Dec 22 0:00 1:00 S
+Rule Uruguay 1976 only - Oct 1 0:00 0 -
+Rule Uruguay 1977 only - Dec 4 0:00 1:00 S
+Rule Uruguay 1978 only - Apr 1 0:00 0 -
+Rule Uruguay 1979 only - Oct 1 0:00 1:00 S
+Rule Uruguay 1980 only - May 1 0:00 0 -
+Rule Uruguay 1987 only - Dec 14 0:00 1:00 S
+Rule Uruguay 1988 only - Mar 14 0:00 0 -
+Rule Uruguay 1988 only - Dec 11 0:00 1:00 S
+Rule Uruguay 1989 only - Mar 12 0:00 0 -
+Rule Uruguay 1989 only - Oct 29 0:00 1:00 S
+# Shanks says no DST was observed in 1990/1 and 1991/2,
+# and that 1992/3's DST was from 10-25 to 03-01. Go with IATA.
+Rule Uruguay 1990 1992 - Mar Sun>=1 0:00 0 -
+Rule Uruguay 1990 1991 - Oct Sun>=21 0:00 1:00 S
+Rule Uruguay 1992 only - Oct 18 0:00 1:00 S
+Rule Uruguay 1993 only - Feb 28 0: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
+ -3:30 Uruguay UY%sT 1942 Dec 14 # Uruguay Time
+ -3:00 Uruguay UY%sT
+
+# Venezuela
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone America/Caracas -4:27:44 - LMT 1890
+ -4:27:40 - CMT 1912 Feb 12 # Caracas Mean Time?
+ -4:30 - VET 1965 # Venezuela Time
+ -4:00 - VET
--- /dev/null
+# @(#)systemv 7.3
+
+# 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 old rules were written).
+#
+# If you need the old rules, uncomment ## lines and comment-out Link 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
+
+# Zone NAME GMTOFF RULES/SAVE FORMAT [UNTIL]
+## Zone SystemV/AST4ADT -4:00 SystemV A%sT
+## Zone SystemV/EST5EDT -5:00 SystemV E%sT
+## Zone SystemV/CST6CDT -6:00 SystemV C%sT
+## Zone SystemV/MST7MDT -7:00 SystemV M%sT
+## Zone SystemV/PST8PDT -8:00 SystemV P%sT
+## Zone SystemV/YST9YDT -9:00 SystemV Y%sT
+## Zone SystemV/AST4 -4:00 - AST
+## Zone SystemV/EST5 -5:00 - EST
+## Zone SystemV/CST6 -6:00 - CST
+## Zone SystemV/MST7 -7:00 - MST
+## 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
--- /dev/null
+#! /bin/sh
+
+: '@(#)yearistype.sh 7.7'
+
+case $#-$1 in
+ 2-|2-0*|2-*[!0-9]*)
+ echo "$0: wild year - $1" >&2
+ exit 1 ;;
+esac
+
+case $#-$2 in
+ 2-even)
+ case $1 in
+ *[24680]) exit 0 ;;
+ *) exit 1 ;;
+ esac ;;
+ 2-nonpres|2-nonuspres)
+ case $1 in
+ *[02468][048]|*[13579][26]) exit 1 ;;
+ *) exit 0 ;;
+ esac ;;
+ 2-odd)
+ case $1 in
+ *[13579]) exit 0 ;;
+ *) exit 1 ;;
+ esac ;;
+ 2-uspres)
+ case $1 in
+ *[02468][048]|*[13579][26]) exit 0 ;;
+ *) exit 1 ;;
+ esac ;;
+ 2-*)
+ echo "$0: wild type - $2" >&2 ;;
+esac
+
+echo "$0: usage is $0 year even|odd|uspres|nonpres|nonuspres" >&2
+exit 1
--- /dev/null
+# @(#)zone.tab 1.29
+#
+# TZ zone descriptions
+#
+# 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'.
+# 2. Latitude and longitude of the zone's principal location
+# in ISO 6709 sign-degrees-minutes-seconds format,
+# either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
+# first latitude (+ is north), then longitude (+ is east).
+# 3. Zone name used in value of TZ environment variable.
+# 4. Comments; present if and only if the country has multiple rows.
+#
+# Columns are separated by a single tab.
+# The table is sorted first by country, then an order within the country that
+# (1) makes some geographical sense, and
+# (2) puts the most populous zones first, where that does not contradict (1).
+#
+# Lines beginning with `#' are comments.
+#
+#country-
+#code coordinates TZ comments
+AD +4230+00131 Europe/Andorra
+AE +2518+05518 Asia/Dubai
+AF +3431+06912 Asia/Kabul
+AG +1703-06148 America/Antigua
+AI +1812-06304 America/Anguilla
+AL +4120+01950 Europe/Tirane
+AM +4011+04430 Asia/Yerevan
+AN +1211-06900 America/Curacao
+AO -0848+01314 Africa/Luanda
+AQ -7750+16636 Antarctica/McMurdo McMurdo Station, Ross Island
+AQ -9000+00000 Antarctica/South_Pole Amundsen-Scott Station, South Pole
+AQ -6734-06808 Antarctica/Rothera Rothera Station, Adelaide Island
+AQ -6448-06406 Antarctica/Palmer Palmer Station, Anvers Island
+AQ -6736+06253 Antarctica/Mawson Mawson Station, Holme Bay
+AQ -6835+07758 Antarctica/Davis Davis Station, Vestfold Hills
+AQ -6617+11031 Antarctica/Casey Casey Station, Bailey Peninsula
+AQ -7824+10654 Antarctica/Vostok Vostok Station, S Magnetic Pole
+AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville Base, Terre Adelie
+AQ -690022+0393524 Antarctica/Syowa Syowa Station, E Ongul I
+AR -3436-05827 America/Buenos_Aires E Argentina (BA, DF, SC, TF)
+AR -3124-06411 America/Cordoba most locations (CB,CC,CH,CN,ER,FM,LP,LR,MN,NQ,RN,SA,SE,SF,SJ,SL,TM)
+AR -2411-06518 America/Jujuy Jujuy (JY)
+AR -2828-06547 America/Catamarca Catamarca (CT)
+AR -3253-06849 America/Mendoza Mendoza (MZ)
+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 -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
+AU -2728+15302 Australia/Brisbane Queensland - most locations
+AU -2016+14900 Australia/Lindeman Queensland - Holiday Islands
+AU -3455+13835 Australia/Adelaide South Australia
+AU -1228+13050 Australia/Darwin Northern Territory
+AU -3157+11551 Australia/Perth Western Australia
+AW +1230-06858 America/Aruba
+AZ +4023+04951 Asia/Baku
+BA +4352+01825 Europe/Sarajevo
+BB +1306-05937 America/Barbados
+BD +2343+09025 Asia/Dhaka
+BE +5050+00420 Europe/Brussels
+BF +1222-00131 Africa/Ouagadougou
+BG +4241+02319 Europe/Sofia
+BH +2623+05035 Asia/Bahrain
+BI -0323+02922 Africa/Bujumbura
+BJ +0629+00237 Africa/Porto-Novo
+BM +3217-06446 Atlantic/Bermuda
+BN +0456+11455 Asia/Brunei
+BO -1630-06809 America/La_Paz
+BR -0351-03225 America/Noronha Atlantic islands
+BR -0127-04829 America/Belem Amapa, E Para
+BR -0343-03830 America/Fortaleza NE Brazil (MA, PI, CE, RN, PB)
+BR -0803-03454 America/Recife Pernambuco
+BR -0712-04812 America/Araguaina Tocantins
+BR -0940-03543 America/Maceio Alagoas, Sergipe
+BR -1259-03831 America/Bahia Bahia
+BR -2332-04637 America/Sao_Paulo S & SE Brazil (GO, DF, MG, ES, RJ, SP, PR, SC, RS)
+BR -2027-05437 America/Campo_Grande Mato Grosso do Sul
+BR -1535-05605 America/Cuiaba Mato Grosso
+BR -0846-06354 America/Porto_Velho W Para, Rondonia
+BR +0249-06040 America/Boa_Vista Roraima
+BR -0308-06001 America/Manaus E Amazonas
+BR -0640-06952 America/Eirunepe W Amazonas
+BR -0958-06748 America/Rio_Branco Acre
+BS +2505-07721 America/Nassau
+BT +2728+08939 Asia/Thimphu
+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 +4612-05957 America/Glace_Bay Atlantic Time - Nova Scotia - places that did not observe DST 1966-1971
+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 +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
+CA +5024-10439 America/Regina Central Standard Time - Saskatchewan - most locations
+CA +5017-10750 America/Swift_Current Central Standard Time - Saskatchewan - midwest
+CA +5333-11328 America/Edmonton Mountain Time - Alberta, east British Columbia & west Saskatchewan
+CA +6227-11421 America/Yellowknife Mountain Time - central Northwest Territories
+CA +6825-11330 America/Inuvik Mountain Time - west Northwest Territories
+CA +5946-12014 America/Dawson_Creek Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia
+CA +4916-12307 America/Vancouver Pacific Time - west British Columbia
+CA +6043-13503 America/Whitehorse Pacific Time - south Yukon
+CA +6404-13925 America/Dawson Pacific Time - north Yukon
+CC -1210+09655 Indian/Cocos
+CD -0418+01518 Africa/Kinshasa west Dem. Rep. of Congo
+CD -1140+02728 Africa/Lubumbashi east Dem. Rep. of Congo
+CF +0422+01835 Africa/Bangui
+CG -0416+01517 Africa/Brazzaville
+CH +4723+00832 Europe/Zurich
+CI +0519-00402 Africa/Abidjan
+CK -2114-15946 Pacific/Rarotonga
+CL -3327-07040 America/Santiago most locations
+CL -2710-10927 Pacific/Easter Easter Island & Sala y Gomez
+CM +0403+00942 Africa/Douala
+CN +3114+12128 Asia/Shanghai east China - Beijing, Guangdong, Shanghai, etc.
+CN +4545+12641 Asia/Harbin Heilongjiang
+CN +2934+10635 Asia/Chongqing central China - Gansu, Guizhou, Sichuan, Yunnan, etc.
+CN +4348+08735 Asia/Urumqi Tibet & most of Xinjiang Uyghur
+CN +3929+07559 Asia/Kashgar southwest Xinjiang Uyghur
+CO +0436-07405 America/Bogota
+CR +0956-08405 America/Costa_Rica
+CS +4450+02030 Europe/Belgrade
+CU +2308-08222 America/Havana
+CV +1455-02331 Atlantic/Cape_Verde
+CX -1025+10543 Indian/Christmas
+CY +3510+03322 Asia/Nicosia
+CZ +5005+01426 Europe/Prague
+DE +5230+01322 Europe/Berlin
+DJ +1136+04309 Africa/Djibouti
+DK +5540+01235 Europe/Copenhagen
+DM +1518-06124 America/Dominica
+DO +1828-06954 America/Santo_Domingo
+DZ +3647+00303 Africa/Algiers
+EC -0210-07950 America/Guayaquil mainland
+EC -0054-08936 Pacific/Galapagos Galapagos Islands
+EE +5925+02445 Europe/Tallinn
+EG +3003+03115 Africa/Cairo
+EH +2709-01312 Africa/El_Aaiun
+ER +1520+03853 Africa/Asmera
+ES +4024-00341 Europe/Madrid mainland
+ES +3553-00519 Africa/Ceuta Ceuta & Melilla
+ES +2806-01524 Atlantic/Canary Canary Islands
+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 +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
+GD +1203-06145 America/Grenada
+GE +4143+04449 Asia/Tbilisi
+GF +0456-05220 America/Cayenne
+GH +0533-00013 Africa/Accra
+GI +3608-00521 Europe/Gibraltar
+GL +6411-05144 America/Godthab most locations
+GL +7646-01840 America/Danmarkshavn east coast, north of Scoresbysund
+GL +7030-02215 America/Scoresbysund Scoresbysund / Ittoqqortoormiit
+GL +7634-06847 America/Thule Thule / Pituffik
+GM +1328-01639 Africa/Banjul
+GN +0931-01343 Africa/Conakry
+GP +1614-06132 America/Guadeloupe
+GQ +0345+00847 Africa/Malabo
+GR +3758+02343 Europe/Athens
+GS -5416-03632 Atlantic/South_Georgia
+GT +1438-09031 America/Guatemala
+GU +1328+14445 Pacific/Guam
+GW +1151-01535 Africa/Bissau
+GY +0648-05810 America/Guyana
+HK +2217+11409 Asia/Hong_Kong
+HN +1406-08713 America/Tegucigalpa
+HR +4548+01558 Europe/Zagreb
+HT +1832-07220 America/Port-au-Prince
+HU +4730+01905 Europe/Budapest
+ID -0610+10648 Asia/Jakarta Java & Sumatra
+ID -0002+10920 Asia/Pontianak west & central Borneo
+ID -0507+11924 Asia/Makassar east & south Borneo, Celebes, Bali, Nusa Tengarra, west Timor
+ID -0232+14042 Asia/Jayapura Irian Jaya & the Moluccas
+IE +5320-00615 Europe/Dublin
+IL +3146+03514 Asia/Jerusalem
+IN +2232+08822 Asia/Calcutta
+IO -0720+07225 Indian/Chagos
+IQ +3321+04425 Asia/Baghdad
+IR +3540+05126 Asia/Tehran
+IS +6409-02151 Atlantic/Reykjavik
+IT +4154+01229 Europe/Rome
+JM +1800-07648 America/Jamaica
+JO +3157+03556 Asia/Amman
+JP +353916+1394441 Asia/Tokyo
+KE -0117+03649 Africa/Nairobi
+KG +4254+07436 Asia/Bishkek
+KH +1133+10455 Asia/Phnom_Penh
+KI +0125+17300 Pacific/Tarawa Gilbert Islands
+KI -0308-17105 Pacific/Enderbury Phoenix Islands
+KI +0152-15720 Pacific/Kiritimati Line Islands
+KM -1141+04316 Indian/Comoro
+KN +1718-06243 America/St_Kitts
+KP +3901+12545 Asia/Pyongyang
+KR +3733+12658 Asia/Seoul
+KW +2920+04759 Asia/Kuwait
+KY +1918-08123 America/Cayman
+KZ +4315+07657 Asia/Almaty most locations
+KZ +4448+06528 Asia/Qyzylorda Qyzylorda (Kyzylorda, Kzyl-Orda)
+KZ +5017+05710 Asia/Aqtobe Aqtobe (Aktobe)
+KZ +4431+05016 Asia/Aqtau Atyrau (Atirau, Gur'yev), Mangghystau (Mankistau)
+KZ +5113+05121 Asia/Oral West Kazakhstan
+LA +1758+10236 Asia/Vientiane
+LB +3353+03530 Asia/Beirut
+LC +1401-06100 America/St_Lucia
+LI +4709+00931 Europe/Vaduz
+LK +0656+07951 Asia/Colombo
+LR +0618-01047 Africa/Monrovia
+LS -2928+02730 Africa/Maseru
+LT +5441+02519 Europe/Vilnius
+LU +4936+00609 Europe/Luxembourg
+LV +5657+02406 Europe/Riga
+LY +3254+01311 Africa/Tripoli
+MA +3339-00735 Africa/Casablanca
+MC +4342+00723 Europe/Monaco
+MD +4700+02850 Europe/Chisinau
+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
+MM +1647+09610 Asia/Rangoon
+MN +4755+10653 Asia/Ulaanbaatar most locations
+MN +4801+09139 Asia/Hovd Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan
+MN +4804+11430 Asia/Choibalsan Dornod, Sukhbaatar
+MO +2214+11335 Asia/Macau
+MP +1512+14545 Pacific/Saipan
+MQ +1436-06105 America/Martinique
+MR +1806-01557 Africa/Nouakchott
+MS +1644-06213 America/Montserrat
+MT +3554+01431 Europe/Malta
+MU -2010+05730 Indian/Mauritius
+MV +0410+07330 Indian/Maldives
+MW -1547+03500 Africa/Blantyre
+MX +1924-09909 America/Mexico_City Central Time - most locations
+MX +2105-08646 America/Cancun Central Time - Quintana Roo
+MX +2058-08937 America/Merida Central Time - Campeche, Yucatan
+MX +2540-10019 America/Monterrey Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas
+MX +2313-10625 America/Mazatlan Mountain Time - S Baja, Nayarit, Sinaloa
+MX +2838-10605 America/Chihuahua Mountain Time - Chihuahua
+MX +2904-11058 America/Hermosillo Mountain Standard Time - Sonora
+MX +3232-11701 America/Tijuana Pacific Time
+MY +0310+10142 Asia/Kuala_Lumpur peninsular Malaysia
+MY +0133+11020 Asia/Kuching Sabah & Sarawak
+MZ -2558+03235 Africa/Maputo
+NA -2234+01706 Africa/Windhoek
+NC -2216+16530 Pacific/Noumea
+NE +1331+00207 Africa/Niamey
+NF -2903+16758 Pacific/Norfolk
+NG +0627+00324 Africa/Lagos
+NI +1209-08617 America/Managua
+NL +5222+00454 Europe/Amsterdam
+NO +5955+01045 Europe/Oslo
+NP +2743+08519 Asia/Katmandu
+NR -0031+16655 Pacific/Nauru
+NU -1901+16955 Pacific/Niue
+NZ -3652+17446 Pacific/Auckland most locations
+NZ -4357-17633 Pacific/Chatham Chatham Islands
+OM +2336+05835 Asia/Muscat
+PA +0858-07932 America/Panama
+PE -1203-07703 America/Lima
+PF -1732-14934 Pacific/Tahiti Society Islands
+PF -0900-13930 Pacific/Marquesas Marquesas Islands
+PF -2308-13457 Pacific/Gambier Gambier Islands
+PG -0930+14710 Pacific/Port_Moresby
+PH +1435+12100 Asia/Manila
+PK +2452+06703 Asia/Karachi
+PL +5215+02100 Europe/Warsaw
+PM +4703-05620 America/Miquelon
+PN -2504-13005 Pacific/Pitcairn
+PR +182806-0660622 America/Puerto_Rico
+PS +3130+03428 Asia/Gaza
+PT +3843-00908 Europe/Lisbon mainland
+PT +3238-01654 Atlantic/Madeira Madeira Islands
+PT +3744-02540 Atlantic/Azores Azores
+PW +0720+13429 Pacific/Palau
+PY -2516-05740 America/Asuncion
+QA +2517+05132 Asia/Qatar
+RE -2052+05528 Indian/Reunion
+RO +4426+02606 Europe/Bucharest
+RU +5443+02030 Europe/Kaliningrad Moscow-01 - Kaliningrad
+RU +5545+03735 Europe/Moscow Moscow+00 - west Russia
+RU +5312+05009 Europe/Samara Moscow+01 - Caspian Sea
+RU +5651+06036 Asia/Yekaterinburg Moscow+02 - Urals
+RU +5500+07324 Asia/Omsk Moscow+03 - west Siberia
+RU +5502+08255 Asia/Novosibirsk Moscow+03 - Novosibirsk
+RU +5601+09250 Asia/Krasnoyarsk Moscow+04 - Yenisei River
+RU +5216+10420 Asia/Irkutsk Moscow+05 - Lake Baikal
+RU +6200+12940 Asia/Yakutsk Moscow+06 - Lena River
+RU +4310+13156 Asia/Vladivostok Moscow+07 - Amur River
+RU +4658+14242 Asia/Sakhalin Moscow+07 - Sakhalin Island
+RU +5934+15048 Asia/Magadan Moscow+08 - Magadan
+RU +5301+15839 Asia/Kamchatka Moscow+09 - Kamchatka
+RU +6445+17729 Asia/Anadyr Moscow+10 - Bering Sea
+RW -0157+03004 Africa/Kigali
+SA +2438+04643 Asia/Riyadh
+SB -0932+16012 Pacific/Guadalcanal
+SC -0440+05528 Indian/Mahe
+SD +1536+03232 Africa/Khartoum
+SE +5920+01803 Europe/Stockholm
+SG +0117+10351 Asia/Singapore
+SH -1555-00542 Atlantic/St_Helena
+SI +4603+01431 Europe/Ljubljana
+SJ +7800+01600 Arctic/Longyearbyen Svalbard
+SJ +7059-00805 Atlantic/Jan_Mayen Jan Mayen
+SK +4809+01707 Europe/Bratislava
+SL +0830-01315 Africa/Freetown
+SM +4355+01228 Europe/San_Marino
+SN +1440-01726 Africa/Dakar
+SO +0204+04522 Africa/Mogadishu
+SR +0550-05510 America/Paramaribo
+ST +0020+00644 Africa/Sao_Tome
+SV +1342-08912 America/El_Salvador
+SY +3330+03618 Asia/Damascus
+SZ -2618+03106 Africa/Mbabane
+TC +2128-07108 America/Grand_Turk
+TD +1207+01503 Africa/Ndjamena
+TF -492110+0701303 Indian/Kerguelen
+TG +0608+00113 Africa/Lome
+TH +1345+10031 Asia/Bangkok
+TJ +3835+06848 Asia/Dushanbe
+TK -0922-17114 Pacific/Fakaofo
+TL -0833+12535 Asia/Dili
+TM +3757+05823 Asia/Ashgabat
+TN +3648+01011 Africa/Tunis
+TO -2110+17510 Pacific/Tongatapu
+TR +4101+02858 Europe/Istanbul
+TT +1039-06131 America/Port_of_Spain
+TV -0831+17913 Pacific/Funafuti
+TW +2503+12130 Asia/Taipei
+TZ -0648+03917 Africa/Dar_es_Salaam
+UA +5026+03031 Europe/Kiev most locations
+UA +4837+02218 Europe/Uzhgorod Ruthenia
+UA +4750+03510 Europe/Zaporozhye Zaporozh'ye, E Lugansk
+UA +4457+03406 Europe/Simferopol central Crimea
+UG +0019+03225 Africa/Kampala
+UM +1700-16830 Pacific/Johnston Johnston Atoll
+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 +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 +415100-0873900 America/Chicago Central Time
+US +450628-0873651 America/Menominee Central Time - Michigan - Wisconsin border
+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
+US +364708-1084111 America/Shiprock Mountain Time - Navajo
+US +332654-1120424 America/Phoenix Mountain Standard Time - Arizona
+US +340308-1181434 America/Los_Angeles Pacific Time
+US +611305-1495401 America/Anchorage Alaska Time
+US +581807-1342511 America/Juneau Alaska Time - Alaska panhandle
+US +593249-1394338 America/Yakutat Alaska Time - Alaska panhandle neck
+US +643004-1652423 America/Nome Alaska Time - west Alaska
+US +515248-1763929 America/Adak Aleutian Islands
+US +211825-1575130 Pacific/Honolulu Hawaii
+UY -3453-05611 America/Montevideo
+UZ +3940+06648 Asia/Samarkand west Uzbekistan
+UZ +4120+06918 Asia/Tashkent east Uzbekistan
+VA +4154+01227 Europe/Vatican
+VC +1309-06114 America/St_Vincent
+VE +1030-06656 America/Caracas
+VG +1827-06437 America/Tortola
+VI +1821-06456 America/St_Thomas
+VN +1045+10640 Asia/Saigon
+VU -1740+16825 Pacific/Efate
+WF -1318-17610 Pacific/Wallis
+WS -1350-17144 Pacific/Apia
+YE +1245+04512 Asia/Aden
+YT -1247+04514 Indian/Mayotte
+ZA -2615+02800 Africa/Johannesburg
+ZM -1525+02817 Africa/Lusaka
+ZW -1750+03103 Africa/Harare
--- /dev/null
+/*\r
+** This file is in the public domain, so clarified as of\r
+*/\r
+\r
+#ifndef lint\r
+#ifndef NOID\r
+static char elsieid[] = "@(#)difftime.c 7.9";\r
+#endif /* !defined NOID */\r
+#endif /* !defined lint */\r
+\r
+/*LINTLIBRARY*/\r
+\r
+#include "private.h"\r
+\r
+/*\r
+*/\r
+\r
+#ifdef HAVE_LONG_DOUBLE\r
+#define long_double long double\r
+#endif /* defined HAVE_LONG_DOUBLE */\r
+#ifndef HAVE_LONG_DOUBLE\r
+#define long_double double\r
+#endif /* !defined HAVE_LONG_DOUBLE */\r
+\r
+double\r
+difftime(time1, time0)\r
+const time_t time1;\r
+const time_t time0;\r
+{\r
+ time_t delta;\r
+ time_t hibit;\r
+\r
+ {\r
+ time_t tt;\r
+ double d;\r
+ long_double ld;\r
+\r
+ if (sizeof tt < sizeof d)\r
+ return (double) time1 - (double) time0;\r
+ if (sizeof tt < sizeof ld)\r
+ return (long_double) time1 - (long_double) time0;\r
+ }\r
+ if (time1 < time0)\r
+ return -difftime(time0, time1);\r
+ /*\r
+ ** As much as possible, avoid loss of precision\r
+ ** by computing the difference before converting to double.\r
+ */\r
+ delta = time1 - time0;\r
+ if (delta >= 0)\r
+ return delta;\r
+ /*\r
+ ** Repair delta overflow.\r
+ */\r
+ hibit = (~ (time_t) 0) << (TYPE_BIT(time_t) - 1);\r
+ /*\r
+ ** The following expression rounds twice, which means\r
+ ** the result may not be the closest to the true answer.\r
+ ** For example, suppose time_t is 64-bit signed int,\r
+ ** long_double is IEEE 754 double with default rounding,\r
+ ** time1 = 9223372036854775807 and time0 = -1536.\r
+ ** Then the true difference is 9223372036854777343,\r
+ ** which rounds to 9223372036854777856\r
+ ** with a total error of 513.\r
+ ** But delta overflows to -9223372036854774273,\r
+ ** which rounds to -9223372036854774784, and correcting\r
+ ** this by subtracting 2 * (long_double) hibit\r
+ ** (i.e. by adding 2**64 = 18446744073709551616)\r
+ ** yields 9223372036854776832, which\r
+ ** rounds to 9223372036854775808\r
+ ** with a total error of 1535 instead.\r
+ ** This problem occurs only with very large differences.\r
+ ** It's too painful to fix this portably.\r
+ ** We are not alone in this problem;\r
+ ** some C compilers round twice when converting\r
+ ** large unsigned types to small floating types,\r
+ ** so if time_t is unsigned the "return delta" above\r
+ ** has the same double-rounding problem with those compilers.\r
+ */\r
+ return delta - 2 * (long_double) hibit;\r
+}\r
--- /dev/null
+#ifndef lint\r
+#ifndef NOID\r
+static char elsieid[] = "@(#)ialloc.c 8.29";\r
+#endif /* !defined NOID */\r
+#endif /* !defined lint */\r
+\r
+/*LINTLIBRARY*/\r
+\r
+#include "private.h"\r
+\r
+#define nonzero(n) (((n) == 0) ? 1 : (n))\r
+\r
+char *\r
+imalloc(n)\r
+const int n;\r
+{\r
+ return malloc((size_t) nonzero(n));\r
+}\r
+\r
+char *\r
+icalloc(nelem, elsize)\r
+int nelem;\r
+int elsize;\r
+{\r
+ if (nelem == 0 || elsize == 0)\r
+ nelem = elsize = 1;\r
+ return calloc((size_t) nelem, (size_t) elsize);\r
+}\r
+\r
+void *\r
+irealloc(pointer, size)\r
+void * const pointer;\r
+const int size;\r
+{\r
+ if (pointer == NULL)\r
+ return imalloc(size);\r
+ return realloc((void *) pointer, (size_t) nonzero(size));\r
+}\r
+\r
+char *\r
+icatalloc(old, new)\r
+char * const old;\r
+const char * const new;\r
+{\r
+ register char * result;\r
+ register int oldsize, newsize;\r
+\r
+ newsize = (new == NULL) ? 0 : strlen(new);\r
+ if (old == NULL)\r
+ oldsize = 0;\r
+ else if (newsize == 0)\r
+ return old;\r
+ else oldsize = strlen(old);\r
+ if ((result = irealloc(old, oldsize + newsize + 1)) != NULL)\r
+ if (new != NULL)\r
+ (void) strcpy(result + oldsize, new);\r
+ return result;\r
+}\r
+\r
+char *\r
+icpyalloc(string)\r
+const char * const string;\r
+{\r
+ return icatalloc((char *) NULL, string);\r
+}\r
+\r
+void\r
+ifree(p)\r
+char * const p;\r
+{\r
+ if (p != NULL)\r
+ (void) free(p);\r
+}\r
+\r
+void\r
+icfree(p)\r
+char * const p;\r
+{\r
+ if (p != NULL)\r
+ (void) free(p);\r
+}\r
--- /dev/null
+/*\r
+** This file is in the public domain, so clarified as of\r
+*/\r
+\r
+#ifndef lint\r
+#ifndef NOID\r
+static char elsieid[] = "@(#)localtime.c 7.78";\r
+#endif /* !defined NOID */\r
+#endif /* !defined lint */\r
+\r
+/*\r
+** POSIX-style TZ environment variable handling from Guy Harris\r
+*/\r
+\r
+/*LINTLIBRARY*/\r
+\r
+#include "private.h"\r
+#include "tzfile.h"\r
+#include "fcntl.h"\r
+\r
+/*\r
+** SunOS 4.1.1 headers lack O_BINARY.\r
+*/\r
+\r
+#ifdef O_BINARY\r
+#define OPEN_MODE (O_RDONLY | O_BINARY)\r
+#endif /* defined O_BINARY */\r
+#ifndef O_BINARY\r
+#define OPEN_MODE O_RDONLY\r
+#endif /* !defined O_BINARY */\r
+\r
+#ifndef WILDABBR\r
+/*\r
+** Someone might make incorrect use of a time zone abbreviation:\r
+** 1. They might reference tzname[0] before calling tzset (explicitly\r
+** or implicitly).\r
+** 2. They might reference tzname[1] before calling tzset (explicitly\r
+** or implicitly).\r
+** 3. They might reference tzname[1] after setting to a time zone\r
+** in which Daylight Saving Time is never observed.\r
+** 4. They might reference tzname[0] after setting to a time zone\r
+** in which Standard Time is never observed.\r
+** 5. They might reference tm.TM_ZONE after calling offtime.\r
+** What's best to do in the above cases is open to debate;\r
+** for now, we just set things up so that in any of the five cases\r
+** WILDABBR is used. Another possibility: initialize tzname[0] to the\r
+** string "tzname[0] used before set", and similarly for the other cases.\r
+** And another: initialize tzname[0] to "ERA", with an explanation in the\r
+** manual page of what this "time zone abbreviation" means (doing this so\r
+** that tzname[0] has the "normal" length of three characters).\r
+*/\r
+#define WILDABBR " "\r
+#endif /* !defined WILDABBR */\r
+\r
+static char wildabbr[] = "WILDABBR";\r
+\r
+static const char gmt[] = "GMT";\r
+\r
+/*\r
+** The DST rules to use if TZ has no rules and we can't load TZDEFRULES.\r
+** We default to US rules as of 1999-08-17.\r
+** POSIX 1003.1 section 8.1.1 says that the default DST rules are\r
+** implementation dependent; for historical reasons, US rules are a\r
+** common default.\r
+*/\r
+#ifndef TZDEFRULESTRING\r
+#define TZDEFRULESTRING ",M4.1.0,M10.5.0"\r
+#endif /* !defined TZDEFDST */\r
+\r
+struct ttinfo { /* time type information */\r
+ long tt_gmtoff; /* UTC offset in seconds */\r
+ int tt_isdst; /* used to set tm_isdst */\r
+ int tt_abbrind; /* abbreviation list index */\r
+ int tt_ttisstd; /* TRUE if transition is std time */\r
+ int tt_ttisgmt; /* TRUE if transition is UTC */\r
+};\r
+\r
+struct lsinfo { /* leap second information */\r
+ time_t ls_trans; /* transition time */\r
+ long ls_corr; /* correction to apply */\r
+};\r
+\r
+#define BIGGEST(a, b) (((a) > (b)) ? (a) : (b))\r
+\r
+#ifdef TZNAME_MAX\r
+#define MY_TZNAME_MAX TZNAME_MAX\r
+#endif /* defined TZNAME_MAX */\r
+#ifndef TZNAME_MAX\r
+#define MY_TZNAME_MAX 255\r
+#endif /* !defined TZNAME_MAX */\r
+\r
+struct state {\r
+ int leapcnt;\r
+ int timecnt;\r
+ int typecnt;\r
+ int charcnt;\r
+ time_t ats[TZ_MAX_TIMES];\r
+ unsigned char types[TZ_MAX_TIMES];\r
+ struct ttinfo ttis[TZ_MAX_TYPES];\r
+ char chars[BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, sizeof gmt),\r
+ (2 * (MY_TZNAME_MAX + 1)))];\r
+ struct lsinfo lsis[TZ_MAX_LEAPS];\r
+};\r
+\r
+struct rule {\r
+ int r_type; /* type of rule--see below */\r
+ int r_day; /* day number of rule */\r
+ int r_week; /* week number of rule */\r
+ int r_mon; /* month number of rule */\r
+ long r_time; /* transition time of rule */\r
+};\r
+\r
+#define JULIAN_DAY 0 /* Jn - Julian day */\r
+#define DAY_OF_YEAR 1 /* n - day of year */\r
+#define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */\r
+\r
+/*\r
+** Prototypes for static functions.\r
+*/\r
+\r
+static long detzcode P((const char * codep));\r
+static const char * getzname P((const char * strp));\r
+static const char * getnum P((const char * strp, int * nump, int min,\r
+ int max));\r
+static const char * getsecs P((const char * strp, long * secsp));\r
+static const char * getoffset P((const char * strp, long * offsetp));\r
+static const char * getrule P((const char * strp, struct rule * rulep));\r
+static void gmtload P((struct state * sp));\r
+static void gmtsub P((const time_t * timep, long offset,\r
+ struct tm * tmp));\r
+static void localsub P((const time_t * timep, long offset,\r
+ struct tm * tmp));\r
+static int increment_overflow P((int * number, int delta));\r
+static int normalize_overflow P((int * tensptr, int * unitsptr,\r
+ int base));\r
+static void settzname P((void));\r
+static time_t time1 P((struct tm * tmp,\r
+ void(*funcp) P((const time_t *,\r
+ long, struct tm *)),\r
+ long offset));\r
+static time_t time2 P((struct tm *tmp,\r
+ void(*funcp) P((const time_t *,\r
+ long, struct tm*)),\r
+ long offset, int * okayp));\r
+static time_t time2sub P((struct tm *tmp,\r
+ void(*funcp) P((const time_t *,\r
+ long, struct tm*)),\r
+ long offset, int * okayp, int do_norm_secs));\r
+static void timesub P((const time_t * timep, long offset,\r
+ const struct state * sp, struct tm * tmp));\r
+static int tmcomp P((const struct tm * atmp,\r
+ const struct tm * btmp));\r
+static time_t transtime P((time_t janfirst, int year,\r
+ const struct rule * rulep, long offset));\r
+static int tzload P((const char * name, struct state * sp));\r
+static int tzparse P((const char * name, struct state * sp,\r
+ int lastditch));\r
+\r
+#ifdef ALL_STATE\r
+static struct state * lclptr;\r
+static struct state * gmtptr;\r
+#endif /* defined ALL_STATE */\r
+\r
+#ifndef ALL_STATE\r
+static struct state lclmem;\r
+static struct state gmtmem;\r
+#define lclptr (&lclmem)\r
+#define gmtptr (&gmtmem)\r
+#endif /* State Farm */\r
+\r
+#ifndef TZ_STRLEN_MAX\r
+#define TZ_STRLEN_MAX 255\r
+#endif /* !defined TZ_STRLEN_MAX */\r
+\r
+static char lcl_TZname[TZ_STRLEN_MAX + 1];\r
+static int lcl_is_set;\r
+static int gmt_is_set;\r
+\r
+char * tzname[2] = {\r
+ wildabbr,\r
+ wildabbr\r
+};\r
+\r
+/*\r
+** Section 4.12.3 of X3.159-1989 requires that\r
+** Except for the strftime function, these functions [asctime,\r
+** ctime, gmtime, localtime] return values in one of two static\r
+** objects: a broken-down time structure and an array of char.\r
+*/\r
+\r
+static struct tm tm;\r
+\r
+#ifdef USG_COMPAT\r
+time_t timezone = 0;\r
+int daylight = 0;\r
+#endif /* defined USG_COMPAT */\r
+\r
+#ifdef ALTZONE\r
+time_t altzone = 0;\r
+#endif /* defined ALTZONE */\r
+\r
+static long\r
+detzcode(codep)\r
+const char * const codep;\r
+{\r
+ register long result;\r
+ register int i;\r
+\r
+ result = (codep[0] & 0x80) ? ~0L : 0L;\r
+ for (i = 0; i < 4; ++i)\r
+ result = (result << 8) | (codep[i] & 0xff);\r
+ return result;\r
+}\r
+\r
+static void\r
+settzname P((void))\r
+{\r
+ register struct state * const sp = lclptr;\r
+ register int i;\r
+\r
+ tzname[0] = wildabbr;\r
+ tzname[1] = wildabbr;\r
+#ifdef USG_COMPAT\r
+ daylight = 0;\r
+ timezone = 0;\r
+#endif /* defined USG_COMPAT */\r
+#ifdef ALTZONE\r
+ altzone = 0;\r
+#endif /* defined ALTZONE */\r
+#ifdef ALL_STATE\r
+ if (sp == NULL) {\r
+ tzname[0] = tzname[1] = gmt;\r
+ return;\r
+ }\r
+#endif /* defined ALL_STATE */\r
+ for (i = 0; i < sp->typecnt; ++i) {\r
+ register const struct ttinfo * const ttisp = &sp->ttis[i];\r
+\r
+ tzname[ttisp->tt_isdst] =\r
+ &sp->chars[ttisp->tt_abbrind];\r
+#ifdef USG_COMPAT\r
+ if (ttisp->tt_isdst)\r
+ daylight = 1;\r
+ if (i == 0 || !ttisp->tt_isdst)\r
+ timezone = -(ttisp->tt_gmtoff);\r
+#endif /* defined USG_COMPAT */\r
+#ifdef ALTZONE\r
+ if (i == 0 || ttisp->tt_isdst)\r
+ altzone = -(ttisp->tt_gmtoff);\r
+#endif /* defined ALTZONE */\r
+ }\r
+ /*\r
+ ** And to get the latest zone names into tzname. . .\r
+ */\r
+ for (i = 0; i < sp->timecnt; ++i) {\r
+ register const struct ttinfo * const ttisp =\r
+ &sp->ttis[\r
+ sp->types[i]];\r
+\r
+ tzname[ttisp->tt_isdst] =\r
+ &sp->chars[ttisp->tt_abbrind];\r
+ }\r
+}\r
+\r
+static int\r
+tzload(name, sp)\r
+register const char * name;\r
+register struct state * const sp;\r
+{\r
+ register const char * p;\r
+ register int i;\r
+ register int fid;\r
+\r
+ if (name == NULL && (name = TZDEFAULT) == NULL)\r
+ return -1;\r
+ {\r
+ register int doaccess;\r
+ /*\r
+ ** Section 4.9.1 of the C standard says that\r
+ ** "FILENAME_MAX expands to an integral constant expression\r
+ ** that is the size needed for an array of char large enough\r
+ ** to hold the longest file name string that the implementation\r
+ ** guarantees can be opened."\r
+ */\r
+ char fullname[FILENAME_MAX + 1];\r
+\r
+ if (name[0] == ':')\r
+ ++name;\r
+ doaccess = name[0] == '/';\r
+ if (!doaccess) {\r
+ if ((p = TZDIR) == NULL)\r
+ return -1;\r
+ if ((strlen(p) + strlen(name) + 1) >= sizeof fullname)\r
+ return -1;\r
+ (void) strcpy(fullname, p);\r
+ (void) strcat(fullname, "/");\r
+ (void) strcat(fullname, name);\r
+ /*\r
+ ** Set doaccess if '.' (as in "../") shows up in name.\r
+ */\r
+ if (strchr(name, '.') != NULL)\r
+ doaccess = TRUE;\r
+ name = fullname;\r
+ }\r
+ if (doaccess && access(name, R_OK) != 0)\r
+ return -1;\r
+ if ((fid = open(name, OPEN_MODE)) == -1)\r
+ return -1;\r
+ }\r
+ {\r
+ struct tzhead * tzhp;\r
+ union {\r
+ struct tzhead tzhead;\r
+ char buf[sizeof *sp + sizeof *tzhp];\r
+ } u;\r
+ int ttisstdcnt;\r
+ int ttisgmtcnt;\r
+\r
+ i = read(fid, u.buf, sizeof u.buf);\r
+ if (close(fid) != 0)\r
+ return -1;\r
+ ttisstdcnt = (int) detzcode(u.tzhead.tzh_ttisstdcnt);\r
+ ttisgmtcnt = (int) detzcode(u.tzhead.tzh_ttisgmtcnt);\r
+ sp->leapcnt = (int) detzcode(u.tzhead.tzh_leapcnt);\r
+ sp->timecnt = (int) detzcode(u.tzhead.tzh_timecnt);\r
+ sp->typecnt = (int) detzcode(u.tzhead.tzh_typecnt);\r
+ sp->charcnt = (int) detzcode(u.tzhead.tzh_charcnt);\r
+ p = u.tzhead.tzh_charcnt + sizeof u.tzhead.tzh_charcnt;\r
+ if (sp->leapcnt < 0 || sp->leapcnt > TZ_MAX_LEAPS ||\r
+ sp->typecnt <= 0 || sp->typecnt > TZ_MAX_TYPES ||\r
+ sp->timecnt < 0 || sp->timecnt > TZ_MAX_TIMES ||\r
+ sp->charcnt < 0 || sp->charcnt > TZ_MAX_CHARS ||\r
+ (ttisstdcnt != sp->typecnt && ttisstdcnt != 0) ||\r
+ (ttisgmtcnt != sp->typecnt && ttisgmtcnt != 0))\r
+ return -1;\r
+ if (i - (p - u.buf) < sp->timecnt * 4 + /* ats */\r
+ sp->timecnt + /* types */\r
+ sp->typecnt * (4 + 2) + /* ttinfos */\r
+ sp->charcnt + /* chars */\r
+ sp->leapcnt * (4 + 4) + /* lsinfos */\r
+ ttisstdcnt + /* ttisstds */\r
+ ttisgmtcnt) /* ttisgmts */\r
+ return -1;\r
+ for (i = 0; i < sp->timecnt; ++i) {\r
+ sp->ats[i] = detzcode(p);\r
+ p += 4;\r
+ }\r
+ for (i = 0; i < sp->timecnt; ++i) {\r
+ sp->types[i] = (unsigned char) *p++;\r
+ if (sp->types[i] >= sp->typecnt)\r
+ return -1;\r
+ }\r
+ for (i = 0; i < sp->typecnt; ++i) {\r
+ register struct ttinfo * ttisp;\r
+\r
+ ttisp = &sp->ttis[i];\r
+ ttisp->tt_gmtoff = detzcode(p);\r
+ p += 4;\r
+ ttisp->tt_isdst = (unsigned char) *p++;\r
+ if (ttisp->tt_isdst != 0 && ttisp->tt_isdst != 1)\r
+ return -1;\r
+ ttisp->tt_abbrind = (unsigned char) *p++;\r
+ if (ttisp->tt_abbrind < 0 ||\r
+ ttisp->tt_abbrind > sp->charcnt)\r
+ return -1;\r
+ }\r
+ for (i = 0; i < sp->charcnt; ++i)\r
+ sp->chars[i] = *p++;\r
+ sp->chars[i] = '\0'; /* ensure '\0' at end */\r
+ for (i = 0; i < sp->leapcnt; ++i) {\r
+ register struct lsinfo * lsisp;\r
+\r
+ lsisp = &sp->lsis[i];\r
+ lsisp->ls_trans = detzcode(p);\r
+ p += 4;\r
+ lsisp->ls_corr = detzcode(p);\r
+ p += 4;\r
+ }\r
+ for (i = 0; i < sp->typecnt; ++i) {\r
+ register struct ttinfo * ttisp;\r
+\r
+ ttisp = &sp->ttis[i];\r
+ if (ttisstdcnt == 0)\r
+ ttisp->tt_ttisstd = FALSE;\r
+ else {\r
+ ttisp->tt_ttisstd = *p++;\r
+ if (ttisp->tt_ttisstd != TRUE &&\r
+ ttisp->tt_ttisstd != FALSE)\r
+ return -1;\r
+ }\r
+ }\r
+ for (i = 0; i < sp->typecnt; ++i) {\r
+ register struct ttinfo * ttisp;\r
+\r
+ ttisp = &sp->ttis[i];\r
+ if (ttisgmtcnt == 0)\r
+ ttisp->tt_ttisgmt = FALSE;\r
+ else {\r
+ ttisp->tt_ttisgmt = *p++;\r
+ if (ttisp->tt_ttisgmt != TRUE &&\r
+ ttisp->tt_ttisgmt != FALSE)\r
+ return -1;\r
+ }\r
+ }\r
+ }\r
+ return 0;\r
+}\r
+\r
+static const int mon_lengths[2][MONSPERYEAR] = {\r
+ { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },\r
+ { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }\r
+};\r
+\r
+static const int year_lengths[2] = {\r
+ DAYSPERNYEAR, DAYSPERLYEAR\r
+};\r
+\r
+/*\r
+** Given a pointer into a time zone string, scan until a character that is not\r
+** a valid character in a zone name is found. Return a pointer to that\r
+** character.\r
+*/\r
+\r
+static const char *\r
+getzname(strp)\r
+register const char * strp;\r
+{\r
+ register char c;\r
+\r
+ while ((c = *strp) != '\0' && !is_digit(c) && c != ',' && c != '-' &&\r
+ c != '+')\r
+ ++strp;\r
+ return strp;\r
+}\r
+\r
+/*\r
+** Given a pointer into a time zone string, extract a number from that string.\r
+** Check that the number is within a specified range; if it is not, return\r
+** NULL.\r
+** Otherwise, return a pointer to the first character not part of the number.\r
+*/\r
+\r
+static const char *\r
+getnum(strp, nump, min, max)\r
+register const char * strp;\r
+int * const nump;\r
+const int min;\r
+const int max;\r
+{\r
+ register char c;\r
+ register int num;\r
+\r
+ if (strp == NULL || !is_digit(c = *strp))\r
+ return NULL;\r
+ num = 0;\r
+ do {\r
+ num = num * 10 + (c - '0');\r
+ if (num > max)\r
+ return NULL; /* illegal value */\r
+ c = *++strp;\r
+ } while (is_digit(c));\r
+ if (num < min)\r
+ return NULL; /* illegal value */\r
+ *nump = num;\r
+ return strp;\r
+}\r
+\r
+/*\r
+** Given a pointer into a time zone string, extract a number of seconds,\r
+** in hh[:mm[:ss]] form, from the string.\r
+** If any error occurs, return NULL.\r
+** Otherwise, return a pointer to the first character not part of the number\r
+** of seconds.\r
+*/\r
+\r
+static const char *\r
+getsecs(strp, secsp)\r
+register const char * strp;\r
+long * const secsp;\r
+{\r
+ int num;\r
+\r
+ /*\r
+ ** `HOURSPERDAY * DAYSPERWEEK - 1' allows quasi-Posix rules like\r
+ ** "M10.4.6/26", which does not conform to Posix,\r
+ ** but which specifies the equivalent of\r
+ ** ``02:00 on the first Sunday on or after 23 Oct''.\r
+ */\r
+ strp = getnum(strp, &num, 0, HOURSPERDAY * DAYSPERWEEK - 1);\r
+ if (strp == NULL)\r
+ return NULL;\r
+ *secsp = num * (long) SECSPERHOUR;\r
+ if (*strp == ':') {\r
+ ++strp;\r
+ strp = getnum(strp, &num, 0, MINSPERHOUR - 1);\r
+ if (strp == NULL)\r
+ return NULL;\r
+ *secsp += num * SECSPERMIN;\r
+ if (*strp == ':') {\r
+ ++strp;\r
+ /* `SECSPERMIN' allows for leap seconds. */\r
+ strp = getnum(strp, &num, 0, SECSPERMIN);\r
+ if (strp == NULL)\r
+ return NULL;\r
+ *secsp += num;\r
+ }\r
+ }\r
+ return strp;\r
+}\r
+\r
+/*\r
+** Given a pointer into a time zone string, extract an offset, in\r
+** [+-]hh[:mm[:ss]] form, from the string.\r
+** If any error occurs, return NULL.\r
+** Otherwise, return a pointer to the first character not part of the time.\r
+*/\r
+\r
+static const char *\r
+getoffset(strp, offsetp)\r
+register const char * strp;\r
+long * const offsetp;\r
+{\r
+ register int neg = 0;\r
+\r
+ if (*strp == '-') {\r
+ neg = 1;\r
+ ++strp;\r
+ } else if (*strp == '+')\r
+ ++strp;\r
+ strp = getsecs(strp, offsetp);\r
+ if (strp == NULL)\r
+ return NULL; /* illegal time */\r
+ if (neg)\r
+ *offsetp = -*offsetp;\r
+ return strp;\r
+}\r
+\r
+/*\r
+** Given a pointer into a time zone string, extract a rule in the form\r
+** date[/time]. See POSIX section 8 for the format of "date" and "time".\r
+** If a valid rule is not found, return NULL.\r
+** Otherwise, return a pointer to the first character not part of the rule.\r
+*/\r
+\r
+static const char *\r
+getrule(strp, rulep)\r
+const char * strp;\r
+register struct rule * const rulep;\r
+{\r
+ if (*strp == 'J') {\r
+ /*\r
+ ** Julian day.\r
+ */\r
+ rulep->r_type = JULIAN_DAY;\r
+ ++strp;\r
+ strp = getnum(strp, &rulep->r_day, 1, DAYSPERNYEAR);\r
+ } else if (*strp == 'M') {\r
+ /*\r
+ ** Month, week, day.\r
+ */\r
+ rulep->r_type = MONTH_NTH_DAY_OF_WEEK;\r
+ ++strp;\r
+ strp = getnum(strp, &rulep->r_mon, 1, MONSPERYEAR);\r
+ if (strp == NULL)\r
+ return NULL;\r
+ if (*strp++ != '.')\r
+ return NULL;\r
+ strp = getnum(strp, &rulep->r_week, 1, 5);\r
+ if (strp == NULL)\r
+ return NULL;\r
+ if (*strp++ != '.')\r
+ return NULL;\r
+ strp = getnum(strp, &rulep->r_day, 0, DAYSPERWEEK - 1);\r
+ } else if (is_digit(*strp)) {\r
+ /*\r
+ ** Day of year.\r
+ */\r
+ rulep->r_type = DAY_OF_YEAR;\r
+ strp = getnum(strp, &rulep->r_day, 0, DAYSPERLYEAR - 1);\r
+ } else return NULL; /* invalid format */\r
+ if (strp == NULL)\r
+ return NULL;\r
+ if (*strp == '/') {\r
+ /*\r
+ ** Time specified.\r
+ */\r
+ ++strp;\r
+ strp = getsecs(strp, &rulep->r_time);\r
+ } else rulep->r_time = 2 * SECSPERHOUR; /* default = 2:00:00 */\r
+ return strp;\r
+}\r
+\r
+/*\r
+** Given the Epoch-relative time of January 1, 00:00:00 UTC, in a year, the\r
+** year, a rule, and the offset from UTC at the time that rule takes effect,\r
+** calculate the Epoch-relative time that rule takes effect.\r
+*/\r
+\r
+static time_t\r
+transtime(janfirst, year, rulep, offset)\r
+const time_t janfirst;\r
+const int year;\r
+register const struct rule * const rulep;\r
+const long offset;\r
+{\r
+ register int leapyear;\r
+ register time_t value;\r
+ register int i;\r
+ int d, m1, yy0, yy1, yy2, dow;\r
+\r
+ INITIALIZE(value);\r
+ leapyear = isleap(year);\r
+ switch (rulep->r_type) {\r
+\r
+ case JULIAN_DAY:\r
+ /*\r
+ ** Jn - Julian day, 1 == January 1, 60 == March 1 even in leap\r
+ ** years.\r
+ ** In non-leap years, or if the day number is 59 or less, just\r
+ ** add SECSPERDAY times the day number-1 to the time of\r
+ ** January 1, midnight, to get the day.\r
+ */\r
+ value = janfirst + (rulep->r_day - 1) * SECSPERDAY;\r
+ if (leapyear && rulep->r_day >= 60)\r
+ value += SECSPERDAY;\r
+ break;\r
+\r
+ case DAY_OF_YEAR:\r
+ /*\r
+ ** n - day of year.\r
+ ** Just add SECSPERDAY times the day number to the time of\r
+ ** January 1, midnight, to get the day.\r
+ */\r
+ value = janfirst + rulep->r_day * SECSPERDAY;\r
+ break;\r
+\r
+ case MONTH_NTH_DAY_OF_WEEK:\r
+ /*\r
+ ** Mm.n.d - nth "dth day" of month m.\r
+ */\r
+ value = janfirst;\r
+ for (i = 0; i < rulep->r_mon - 1; ++i)\r
+ value += mon_lengths[leapyear][i] * SECSPERDAY;\r
+\r
+ /*\r
+ ** Use Zeller's Congruence to get day-of-week of first day of\r
+ ** month.\r
+ */\r
+ m1 = (rulep->r_mon + 9) % 12 + 1;\r
+ yy0 = (rulep->r_mon <= 2) ? (year - 1) : year;\r
+ yy1 = yy0 / 100;\r
+ yy2 = yy0 % 100;\r
+ dow = ((26 * m1 - 2) / 10 +\r
+ 1 + yy2 + yy2 / 4 + yy1 / 4 - 2 * yy1) % 7;\r
+ if (dow < 0)\r
+ dow += DAYSPERWEEK;\r
+\r
+ /*\r
+ ** "dow" is the day-of-week of the first day of the month. Get\r
+ ** the day-of-month (zero-origin) of the first "dow" day of the\r
+ ** month.\r
+ */\r
+ d = rulep->r_day - dow;\r
+ if (d < 0)\r
+ d += DAYSPERWEEK;\r
+ for (i = 1; i < rulep->r_week; ++i) {\r
+ if (d + DAYSPERWEEK >=\r
+ mon_lengths[leapyear][rulep->r_mon - 1])\r
+ break;\r
+ d += DAYSPERWEEK;\r
+ }\r
+\r
+ /*\r
+ ** "d" is the day-of-month (zero-origin) of the day we want.\r
+ */\r
+ value += d * SECSPERDAY;\r
+ break;\r
+ }\r
+\r
+ /*\r
+ ** "value" is the Epoch-relative time of 00:00:00 UTC on the day in\r
+ ** question. To get the Epoch-relative time of the specified local\r
+ ** time on that day, add the transition time and the current offset\r
+ ** from UTC.\r
+ */\r
+ return value + rulep->r_time + offset;\r
+}\r
+\r
+/*\r
+** Given a POSIX section 8-style TZ string, fill in the rule tables as\r
+** appropriate.\r
+*/\r
+\r
+static int\r
+tzparse(name, sp, lastditch)\r
+const char * name;\r
+register struct state * const sp;\r
+const int lastditch;\r
+{\r
+ const char * stdname;\r
+ const char * dstname;\r
+ size_t stdlen;\r
+ size_t dstlen;\r
+ long stdoffset;\r
+ long dstoffset;\r
+ register time_t * atp;\r
+ register unsigned char * typep;\r
+ register char * cp;\r
+ register int load_result;\r
+\r
+ INITIALIZE(dstname);\r
+ stdname = name;\r
+ if (lastditch) {\r
+ stdlen = strlen(name); /* length of standard zone name */\r
+ name += stdlen;\r
+ if (stdlen >= sizeof sp->chars)\r
+ stdlen = (sizeof sp->chars) - 1;\r
+ stdoffset = 0;\r
+ } else {\r
+ name = getzname(name);\r
+ stdlen = name - stdname;\r
+ if (stdlen < 3)\r
+ return -1;\r
+ if (*name == '\0')\r
+ return -1;\r
+ name = getoffset(name, &stdoffset);\r
+ if (name == NULL)\r
+ return -1;\r
+ }\r
+ load_result = tzload(TZDEFRULES, sp);\r
+ if (load_result != 0)\r
+ sp->leapcnt = 0; /* so, we're off a little */\r
+ if (*name != '\0') {\r
+ dstname = name;\r
+ name = getzname(name);\r
+ dstlen = name - dstname; /* length of DST zone name */\r
+ if (dstlen < 3)\r
+ return -1;\r
+ if (*name != '\0' && *name != ',' && *name != ';') {\r
+ name = getoffset(name, &dstoffset);\r
+ if (name == NULL)\r
+ return -1;\r
+ } else dstoffset = stdoffset - SECSPERHOUR;\r
+ if (*name == '\0' && load_result != 0)\r
+ name = TZDEFRULESTRING;\r
+ if (*name == ',' || *name == ';') {\r
+ struct rule start;\r
+ struct rule end;\r
+ register int year;\r
+ register time_t janfirst;\r
+ time_t starttime;\r
+ time_t endtime;\r
+\r
+ ++name;\r
+ if ((name = getrule(name, &start)) == NULL)\r
+ return -1;\r
+ if (*name++ != ',')\r
+ return -1;\r
+ if ((name = getrule(name, &end)) == NULL)\r
+ return -1;\r
+ if (*name != '\0')\r
+ return -1;\r
+ sp->typecnt = 2; /* standard time and DST */\r
+ /*\r
+ ** Two transitions per year, from EPOCH_YEAR to 2037.\r
+ */\r
+ sp->timecnt = 2 * (2037 - EPOCH_YEAR + 1);\r
+ if (sp->timecnt > TZ_MAX_TIMES)\r
+ return -1;\r
+ sp->ttis[0].tt_gmtoff = -dstoffset;\r
+ sp->ttis[0].tt_isdst = 1;\r
+ sp->ttis[0].tt_abbrind = stdlen + 1;\r
+ sp->ttis[1].tt_gmtoff = -stdoffset;\r
+ sp->ttis[1].tt_isdst = 0;\r
+ sp->ttis[1].tt_abbrind = 0;\r
+ atp = sp->ats;\r
+ typep = sp->types;\r
+ janfirst = 0;\r
+ for (year = EPOCH_YEAR; year <= 2037; ++year) {\r
+ starttime = transtime(janfirst, year, &start,\r
+ stdoffset);\r
+ endtime = transtime(janfirst, year, &end,\r
+ dstoffset);\r
+ if (starttime > endtime) {\r
+ *atp++ = endtime;\r
+ *typep++ = 1; /* DST ends */\r
+ *atp++ = starttime;\r
+ *typep++ = 0; /* DST begins */\r
+ } else {\r
+ *atp++ = starttime;\r
+ *typep++ = 0; /* DST begins */\r
+ *atp++ = endtime;\r
+ *typep++ = 1; /* DST ends */\r
+ }\r
+ janfirst += year_lengths[isleap(year)] *\r
+ SECSPERDAY;\r
+ }\r
+ } else {\r
+ register long theirstdoffset;\r
+ register long theirdstoffset;\r
+ register long theiroffset;\r
+ register int isdst;\r
+ register int i;\r
+ register int j;\r
+\r
+ if (*name != '\0')\r
+ return -1;\r
+ /*\r
+ ** Initial values of theirstdoffset and theirdstoffset.\r
+ */\r
+ theirstdoffset = 0;\r
+ for (i = 0; i < sp->timecnt; ++i) {\r
+ j = sp->types[i];\r
+ if (!sp->ttis[j].tt_isdst) {\r
+ theirstdoffset =\r
+ -sp->ttis[j].tt_gmtoff;\r
+ break;\r
+ }\r
+ }\r
+ theirdstoffset = 0;\r
+ for (i = 0; i < sp->timecnt; ++i) {\r
+ j = sp->types[i];\r
+ if (sp->ttis[j].tt_isdst) {\r
+ theirdstoffset =\r
+ -sp->ttis[j].tt_gmtoff;\r
+ break;\r
+ }\r
+ }\r
+ /*\r
+ ** Initially we're assumed to be in standard time.\r
+ */\r
+ isdst = FALSE;\r
+ theiroffset = theirstdoffset;\r
+ /*\r
+ ** Now juggle transition times and types\r
+ ** tracking offsets as you do.\r
+ */\r
+ for (i = 0; i < sp->timecnt; ++i) {\r
+ j = sp->types[i];\r
+ sp->types[i] = sp->ttis[j].tt_isdst;\r
+ if (sp->ttis[j].tt_ttisgmt) {\r
+ /* No adjustment to transition time */\r
+ } else {\r
+ /*\r
+ ** If summer time is in effect, and the\r
+ ** transition time was not specified as\r
+ ** standard time, add the summer time\r
+ ** offset to the transition time;\r
+ ** otherwise, add the standard time\r
+ ** offset to the transition time.\r
+ */\r
+ /*\r
+ ** Transitions from DST to DDST\r
+ ** will effectively disappear since\r
+ ** POSIX provides for only one DST\r
+ ** offset.\r
+ */\r
+ if (isdst && !sp->ttis[j].tt_ttisstd) {\r
+ sp->ats[i] += dstoffset -\r
+ theirdstoffset;\r
+ } else {\r
+ sp->ats[i] += stdoffset -\r
+ theirstdoffset;\r
+ }\r
+ }\r
+ theiroffset = -sp->ttis[j].tt_gmtoff;\r
+ if (sp->ttis[j].tt_isdst)\r
+ theirdstoffset = theiroffset;\r
+ else theirstdoffset = theiroffset;\r
+ }\r
+ /*\r
+ ** Finally, fill in ttis.\r
+ ** ttisstd and ttisgmt need not be handled.\r
+ */\r
+ sp->ttis[0].tt_gmtoff = -stdoffset;\r
+ sp->ttis[0].tt_isdst = FALSE;\r
+ sp->ttis[0].tt_abbrind = 0;\r
+ sp->ttis[1].tt_gmtoff = -dstoffset;\r
+ sp->ttis[1].tt_isdst = TRUE;\r
+ sp->ttis[1].tt_abbrind = stdlen + 1;\r
+ sp->typecnt = 2;\r
+ }\r
+ } else {\r
+ dstlen = 0;\r
+ sp->typecnt = 1; /* only standard time */\r
+ sp->timecnt = 0;\r
+ sp->ttis[0].tt_gmtoff = -stdoffset;\r
+ sp->ttis[0].tt_isdst = 0;\r
+ sp->ttis[0].tt_abbrind = 0;\r
+ }\r
+ sp->charcnt = stdlen + 1;\r
+ if (dstlen != 0)\r
+ sp->charcnt += dstlen + 1;\r
+ if ((size_t) sp->charcnt > sizeof sp->chars)\r
+ return -1;\r
+ cp = sp->chars;\r
+ (void) strncpy(cp, stdname, stdlen);\r
+ cp += stdlen;\r
+ *cp++ = '\0';\r
+ if (dstlen != 0) {\r
+ (void) strncpy(cp, dstname, dstlen);\r
+ *(cp + dstlen) = '\0';\r
+ }\r
+ return 0;\r
+}\r
+\r
+static void\r
+gmtload(sp)\r
+struct state * const sp;\r
+{\r
+ if (tzload(gmt, sp) != 0)\r
+ (void) tzparse(gmt, sp, TRUE);\r
+}\r
+\r
+#ifndef STD_INSPIRED\r
+/*\r
+** A non-static declaration of tzsetwall in a system header file\r
+** may cause a warning about this upcoming static declaration...\r
+*/\r
+static\r
+#endif /* !defined STD_INSPIRED */\r
+void\r
+tzsetwall P((void))\r
+{\r
+ if (lcl_is_set < 0)\r
+ return;\r
+ lcl_is_set = -1;\r
+\r
+#ifdef ALL_STATE\r
+ if (lclptr == NULL) {\r
+ lclptr = (struct state *) malloc(sizeof *lclptr);\r
+ if (lclptr == NULL) {\r
+ settzname(); /* all we can do */\r
+ return;\r
+ }\r
+ }\r
+#endif /* defined ALL_STATE */\r
+ if (tzload((char *) NULL, lclptr) != 0)\r
+ gmtload(lclptr);\r
+ settzname();\r
+}\r
+\r
+void\r
+tzset P((void))\r
+{\r
+ register const char * name;\r
+\r
+ name = getenv("TZ");\r
+ if (name == NULL) {\r
+ tzsetwall();\r
+ return;\r
+ }\r
+\r
+ if (lcl_is_set > 0 && strcmp(lcl_TZname, name) == 0)\r
+ return;\r
+ lcl_is_set = strlen(name) < sizeof lcl_TZname;\r
+ if (lcl_is_set)\r
+ (void) strcpy(lcl_TZname, name);\r
+\r
+#ifdef ALL_STATE\r
+ if (lclptr == NULL) {\r
+ lclptr = (struct state *) malloc(sizeof *lclptr);\r
+ if (lclptr == NULL) {\r
+ settzname(); /* all we can do */\r
+ return;\r
+ }\r
+ }\r
+#endif /* defined ALL_STATE */\r
+ if (*name == '\0') {\r
+ /*\r
+ ** User wants it fast rather than right.\r
+ */\r
+ lclptr->leapcnt = 0; /* so, we're off a little */\r
+ lclptr->timecnt = 0;\r
+ lclptr->typecnt = 0;\r
+ lclptr->ttis[0].tt_isdst = 0;\r
+ lclptr->ttis[0].tt_gmtoff = 0;\r
+ lclptr->ttis[0].tt_abbrind = 0;\r
+ (void) strcpy(lclptr->chars, gmt);\r
+ } else if (tzload(name, lclptr) != 0)\r
+ if (name[0] == ':' || tzparse(name, lclptr, FALSE) != 0)\r
+ (void) gmtload(lclptr);\r
+ settzname();\r
+}\r
+\r
+/*\r
+** The easy way to behave "as if no library function calls" localtime\r
+** is to not call it--so we drop its guts into "localsub", which can be\r
+** freely called. (And no, the PANS doesn't require the above behavior--\r
+** but it *is* desirable.)\r
+**\r
+** The unused offset argument is for the benefit of mktime variants.\r
+*/\r
+\r
+/*ARGSUSED*/\r
+static void\r
+localsub(timep, offset, tmp)\r
+const time_t * const timep;\r
+const long offset;\r
+struct tm * const tmp;\r
+{\r
+ register struct state * sp;\r
+ register const struct ttinfo * ttisp;\r
+ register int i;\r
+ const time_t t = *timep;\r
+\r
+ sp = lclptr;\r
+#ifdef ALL_STATE\r
+ if (sp == NULL) {\r
+ gmtsub(timep, offset, tmp);\r
+ return;\r
+ }\r
+#endif /* defined ALL_STATE */\r
+ if (sp->timecnt == 0 || t < sp->ats[0]) {\r
+ i = 0;\r
+ while (sp->ttis[i].tt_isdst)\r
+ if (++i >= sp->typecnt) {\r
+ i = 0;\r
+ break;\r
+ }\r
+ } else {\r
+ for (i = 1; i < sp->timecnt; ++i)\r
+ if (t < sp->ats[i])\r
+ break;\r
+ i = sp->types[i - 1];\r
+ }\r
+ ttisp = &sp->ttis[i];\r
+ /*\r
+ ** To get (wrong) behavior that's compatible with System V Release 2.0\r
+ ** you'd replace the statement below with\r
+ ** t += ttisp->tt_gmtoff;\r
+ ** timesub(&t, 0L, sp, tmp);\r
+ */\r
+ timesub(&t, ttisp->tt_gmtoff, sp, tmp);\r
+ tmp->tm_isdst = ttisp->tt_isdst;\r
+ tzname[tmp->tm_isdst] = &sp->chars[ttisp->tt_abbrind];\r
+#ifdef TM_ZONE\r
+ tmp->TM_ZONE = &sp->chars[ttisp->tt_abbrind];\r
+#endif /* defined TM_ZONE */\r
+}\r
+\r
+struct tm *\r
+localtime(timep)\r
+const time_t * const timep;\r
+{\r
+ tzset();\r
+ localsub(timep, 0L, &tm);\r
+ return &tm;\r
+}\r
+\r
+/*\r
+** Re-entrant version of localtime.\r
+*/\r
+\r
+struct tm *\r
+localtime_r(timep, tm)\r
+const time_t * const timep;\r
+struct tm * tm;\r
+{\r
+ localsub(timep, 0L, tm);\r
+ return tm;\r
+}\r
+\r
+/*\r
+** gmtsub is to gmtime as localsub is to localtime.\r
+*/\r
+\r
+static void\r
+gmtsub(timep, offset, tmp)\r
+const time_t * const timep;\r
+const long offset;\r
+struct tm * const tmp;\r
+{\r
+ if (!gmt_is_set) {\r
+ gmt_is_set = TRUE;\r
+#ifdef ALL_STATE\r
+ gmtptr = (struct state *) malloc(sizeof *gmtptr);\r
+ if (gmtptr != NULL)\r
+#endif /* defined ALL_STATE */\r
+ gmtload(gmtptr);\r
+ }\r
+ timesub(timep, offset, gmtptr, tmp);\r
+#ifdef TM_ZONE\r
+ /*\r
+ ** Could get fancy here and deliver something such as\r
+ ** "UTC+xxxx" or "UTC-xxxx" if offset is non-zero,\r
+ ** but this is no time for a treasure hunt.\r
+ */\r
+ if (offset != 0)\r
+ tmp->TM_ZONE = wildabbr;\r
+ else {\r
+#ifdef ALL_STATE\r
+ if (gmtptr == NULL)\r
+ tmp->TM_ZONE = gmt;\r
+ else tmp->TM_ZONE = gmtptr->chars;\r
+#endif /* defined ALL_STATE */\r
+#ifndef ALL_STATE\r
+ tmp->TM_ZONE = gmtptr->chars;\r
+#endif /* State Farm */\r
+ }\r
+#endif /* defined TM_ZONE */\r
+}\r
+\r
+struct tm *\r
+gmtime(timep)\r
+const time_t * const timep;\r
+{\r
+ gmtsub(timep, 0L, &tm);\r
+ return &tm;\r
+}\r
+\r
+/*\r
+* Re-entrant version of gmtime.\r
+*/\r
+\r
+struct tm *\r
+gmtime_r(timep, tm)\r
+const time_t * const timep;\r
+struct tm * tm;\r
+{\r
+ gmtsub(timep, 0L, tm);\r
+ return tm;\r
+}\r
+\r
+#ifdef STD_INSPIRED\r
+\r
+struct tm *\r
+offtime(timep, offset)\r
+const time_t * const timep;\r
+const long offset;\r
+{\r
+ gmtsub(timep, offset, &tm);\r
+ return &tm;\r
+}\r
+\r
+#endif /* defined STD_INSPIRED */\r
+\r
+static void\r
+timesub(timep, offset, sp, tmp)\r
+const time_t * const timep;\r
+const long offset;\r
+register const struct state * const sp;\r
+register struct tm * const tmp;\r
+{\r
+ register const struct lsinfo * lp;\r
+ register long days;\r
+ register long rem;\r
+ register int y;\r
+ register int yleap;\r
+ register const int * ip;\r
+ register long corr;\r
+ register int hit;\r
+ register int i;\r
+\r
+ corr = 0;\r
+ hit = 0;\r
+#ifdef ALL_STATE\r
+ i = (sp == NULL) ? 0 : sp->leapcnt;\r
+#endif /* defined ALL_STATE */\r
+#ifndef ALL_STATE\r
+ i = sp->leapcnt;\r
+#endif /* State Farm */\r
+ while (--i >= 0) {\r
+ lp = &sp->lsis[i];\r
+ if (*timep >= lp->ls_trans) {\r
+ if (*timep == lp->ls_trans) {\r
+ hit = ((i == 0 && lp->ls_corr > 0) ||\r
+ lp->ls_corr > sp->lsis[i - 1].ls_corr);\r
+ if (hit)\r
+ while (i > 0 &&\r
+ sp->lsis[i].ls_trans ==\r
+ sp->lsis[i - 1].ls_trans + 1 &&\r
+ sp->lsis[i].ls_corr ==\r
+ sp->lsis[i - 1].ls_corr + 1) {\r
+ ++hit;\r
+ --i;\r
+ }\r
+ }\r
+ corr = lp->ls_corr;\r
+ break;\r
+ }\r
+ }\r
+ days = *timep / SECSPERDAY;\r
+ rem = *timep % SECSPERDAY;\r
+#ifdef mc68k\r
+ if (*timep == 0x80000000) {\r
+ /*\r
+ ** A 3B1 muffs the division on the most negative number.\r
+ */\r
+ days = -24855;\r
+ rem = -11648;\r
+ }\r
+#endif /* defined mc68k */\r
+ rem += (offset - corr);\r
+ while (rem < 0) {\r
+ rem += SECSPERDAY;\r
+ --days;\r
+ }\r
+ while (rem >= SECSPERDAY) {\r
+ rem -= SECSPERDAY;\r
+ ++days;\r
+ }\r
+ tmp->tm_hour = (int) (rem / SECSPERHOUR);\r
+ rem = rem % SECSPERHOUR;\r
+ tmp->tm_min = (int) (rem / SECSPERMIN);\r
+ /*\r
+ ** A positive leap second requires a special\r
+ ** representation. This uses "... ??:59:60" et seq.\r
+ */\r
+ tmp->tm_sec = (int) (rem % SECSPERMIN) + hit;\r
+ tmp->tm_wday = (int) ((EPOCH_WDAY + days) % DAYSPERWEEK);\r
+ if (tmp->tm_wday < 0)\r
+ tmp->tm_wday += DAYSPERWEEK;\r
+ y = EPOCH_YEAR;\r
+#define LEAPS_THRU_END_OF(y) ((y) / 4 - (y) / 100 + (y) / 400)\r
+ while (days < 0 || days >= (long) year_lengths[yleap = isleap(y)]) {\r
+ register int newy;\r
+\r
+ newy = y + days / DAYSPERNYEAR;\r
+ if (days < 0)\r
+ --newy;\r
+ days -= (newy - y) * DAYSPERNYEAR +\r
+ LEAPS_THRU_END_OF(newy - 1) -\r
+ LEAPS_THRU_END_OF(y - 1);\r
+ y = newy;\r
+ }\r
+ tmp->tm_year = y - TM_YEAR_BASE;\r
+ tmp->tm_yday = (int) days;\r
+ ip = mon_lengths[yleap];\r
+ for (tmp->tm_mon = 0; days >= (long) ip[tmp->tm_mon]; ++(tmp->tm_mon))\r
+ days = days - (long) ip[tmp->tm_mon];\r
+ tmp->tm_mday = (int) (days + 1);\r
+ tmp->tm_isdst = 0;\r
+#ifdef TM_GMTOFF\r
+ tmp->TM_GMTOFF = offset;\r
+#endif /* defined TM_GMTOFF */\r
+}\r
+\r
+char *\r
+ctime(timep)\r
+const time_t * const timep;\r
+{\r
+/*\r
+** Section 4.12.3.2 of X3.159-1989 requires that\r
+** The ctime function converts the calendar time pointed to by timer\r
+** to local time in the form of a string. It is equivalent to\r
+** asctime(localtime(timer))\r
+*/\r
+ return asctime(localtime(timep));\r
+}\r
+\r
+char *\r
+ctime_r(timep, buf)\r
+const time_t * const timep;\r
+char * buf;\r
+{\r
+ struct tm tm;\r
+\r
+ return asctime_r(localtime_r(timep, &tm), buf);\r
+}\r
+\r
+/*\r
+** Adapted from code provided by Robert Elz, who writes:\r
+** The "best" way to do mktime I think is based on an idea of Bob\r
+** Kridle's (so its said...) from a long time ago.\r
+** It does a binary search of the time_t space. Since time_t's are\r
+** just 32 bits, its a max of 32 iterations (even at 64 bits it\r
+** would still be very reasonable).\r
+*/\r
+\r
+#ifndef WRONG\r
+#define WRONG (-1)\r
+#endif /* !defined WRONG */\r
+\r
+/*\r
+*/\r
+\r
+static int\r
+increment_overflow(number, delta)\r
+int * number;\r
+int delta;\r
+{\r
+ int number0;\r
+\r
+ number0 = *number;\r
+ *number += delta;\r
+ return (*number < number0) != (delta < 0);\r
+}\r
+\r
+static int\r
+normalize_overflow(tensptr, unitsptr, base)\r
+int * const tensptr;\r
+int * const unitsptr;\r
+const int base;\r
+{\r
+ register int tensdelta;\r
+\r
+ tensdelta = (*unitsptr >= 0) ?\r
+ (*unitsptr / base) :\r
+ (-1 - (-1 - *unitsptr) / base);\r
+ *unitsptr -= tensdelta * base;\r
+ return increment_overflow(tensptr, tensdelta);\r
+}\r
+\r
+static int\r
+tmcomp(atmp, btmp)\r
+register const struct tm * const atmp;\r
+register const struct tm * const btmp;\r
+{\r
+ register int result;\r
+\r
+ if ((result = (atmp->tm_year - btmp->tm_year)) == 0 &&\r
+ (result = (atmp->tm_mon - btmp->tm_mon)) == 0 &&\r
+ (result = (atmp->tm_mday - btmp->tm_mday)) == 0 &&\r
+ (result = (atmp->tm_hour - btmp->tm_hour)) == 0 &&\r
+ (result = (atmp->tm_min - btmp->tm_min)) == 0)\r
+ result = atmp->tm_sec - btmp->tm_sec;\r
+ return result;\r
+}\r
+\r
+static time_t\r
+time2sub(tmp, funcp, offset, okayp, do_norm_secs)\r
+struct tm * const tmp;\r
+void (* const funcp) P((const time_t*, long, struct tm*));\r
+const long offset;\r
+int * const okayp;\r
+const int do_norm_secs;\r
+{\r
+ register const struct state * sp;\r
+ register int dir;\r
+ register int bits;\r
+ register int i, j ;\r
+ register int saved_seconds;\r
+ time_t newt;\r
+ time_t t;\r
+ struct tm yourtm, mytm;\r
+\r
+ *okayp = FALSE;\r
+ yourtm = *tmp;\r
+ if (do_norm_secs) {\r
+ if (normalize_overflow(&yourtm.tm_min, &yourtm.tm_sec,\r
+ SECSPERMIN))\r
+ return WRONG;\r
+ }\r
+ if (normalize_overflow(&yourtm.tm_hour, &yourtm.tm_min, MINSPERHOUR))\r
+ return WRONG;\r
+ if (normalize_overflow(&yourtm.tm_mday, &yourtm.tm_hour, HOURSPERDAY))\r
+ return WRONG;\r
+ if (normalize_overflow(&yourtm.tm_year, &yourtm.tm_mon, MONSPERYEAR))\r
+ return WRONG;\r
+ /*\r
+ ** Turn yourtm.tm_year into an actual year number for now.\r
+ ** It is converted back to an offset from TM_YEAR_BASE later.\r
+ */\r
+ if (increment_overflow(&yourtm.tm_year, TM_YEAR_BASE))\r
+ return WRONG;\r
+ while (yourtm.tm_mday <= 0) {\r
+ if (increment_overflow(&yourtm.tm_year, -1))\r
+ return WRONG;\r
+ i = yourtm.tm_year + (1 < yourtm.tm_mon);\r
+ yourtm.tm_mday += year_lengths[isleap(i)];\r
+ }\r
+ while (yourtm.tm_mday > DAYSPERLYEAR) {\r
+ i = yourtm.tm_year + (1 < yourtm.tm_mon);\r
+ yourtm.tm_mday -= year_lengths[isleap(i)];\r
+ if (increment_overflow(&yourtm.tm_year, 1))\r
+ return WRONG;\r
+ }\r
+ for ( ; ; ) {\r
+ i = mon_lengths[isleap(yourtm.tm_year)][yourtm.tm_mon];\r
+ if (yourtm.tm_mday <= i)\r
+ break;\r
+ yourtm.tm_mday -= i;\r
+ if (++yourtm.tm_mon >= MONSPERYEAR) {\r
+ yourtm.tm_mon = 0;\r
+ if (increment_overflow(&yourtm.tm_year, 1))\r
+ return WRONG;\r
+ }\r
+ }\r
+ if (increment_overflow(&yourtm.tm_year, -TM_YEAR_BASE))\r
+ return WRONG;\r
+ if (yourtm.tm_sec >= 0 && yourtm.tm_sec < SECSPERMIN)\r
+ saved_seconds = 0;\r
+ else if (yourtm.tm_year + TM_YEAR_BASE < EPOCH_YEAR) {\r
+ /*\r
+ ** We can't set tm_sec to 0, because that might push the\r
+ ** time below the minimum representable time.\r
+ ** Set tm_sec to 59 instead.\r
+ ** This assumes that the minimum representable time is\r
+ ** not in the same minute that a leap second was deleted from,\r
+ ** which is a safer assumption than using 58 would be.\r
+ */\r
+ if (increment_overflow(&yourtm.tm_sec, 1 - SECSPERMIN))\r
+ return WRONG;\r
+ saved_seconds = yourtm.tm_sec;\r
+ yourtm.tm_sec = SECSPERMIN - 1;\r
+ } else {\r
+ saved_seconds = yourtm.tm_sec;\r
+ yourtm.tm_sec = 0;\r
+ }\r
+ /*\r
+ ** Divide the search space in half\r
+ ** (this works whether time_t is signed or unsigned).\r
+ */\r
+ bits = TYPE_BIT(time_t) - 1;\r
+ /*\r
+ ** If time_t is signed, then 0 is just above the median,\r
+ ** assuming two's complement arithmetic.\r
+ ** If time_t is unsigned, then (1 << bits) is just above the median.\r
+ */\r
+ t = TYPE_SIGNED(time_t) ? 0 : (((time_t) 1) << bits);\r
+ for ( ; ; ) {\r
+ (*funcp)(&t, offset, &mytm);\r
+ dir = tmcomp(&mytm, &yourtm);\r
+ if (dir != 0) {\r
+ if (bits-- < 0)\r
+ return WRONG;\r
+ if (bits < 0)\r
+ --t; /* may be needed if new t is minimal */\r
+ else if (dir > 0)\r
+ t -= ((time_t) 1) << bits;\r
+ else t += ((time_t) 1) << bits;\r
+ continue;\r
+ }\r
+ if (yourtm.tm_isdst < 0 || mytm.tm_isdst == yourtm.tm_isdst)\r
+ break;\r
+ /*\r
+ ** Right time, wrong type.\r
+ ** Hunt for right time, right type.\r
+ ** It's okay to guess wrong since the guess\r
+ ** gets checked.\r
+ */\r
+ /*\r
+ ** The (void *) casts are the benefit of SunOS 3.3 on Sun 2's.\r
+ */\r
+ sp = (const struct state *)\r
+ (((void *) funcp == (void *) localsub) ?\r
+ lclptr : gmtptr);\r
+#ifdef ALL_STATE\r
+ if (sp == NULL)\r
+ return WRONG;\r
+#endif /* defined ALL_STATE */\r
+ for (i = sp->typecnt - 1; i >= 0; --i) {\r
+ if (sp->ttis[i].tt_isdst != yourtm.tm_isdst)\r
+ continue;\r
+ for (j = sp->typecnt - 1; j >= 0; --j) {\r
+ if (sp->ttis[j].tt_isdst == yourtm.tm_isdst)\r
+ continue;\r
+ newt = t + sp->ttis[j].tt_gmtoff -\r
+ sp->ttis[i].tt_gmtoff;\r
+ (*funcp)(&newt, offset, &mytm);\r
+ if (tmcomp(&mytm, &yourtm) != 0)\r
+ continue;\r
+ if (mytm.tm_isdst != yourtm.tm_isdst)\r
+ continue;\r
+ /*\r
+ ** We have a match.\r
+ */\r
+ t = newt;\r
+ goto label;\r
+ }\r
+ }\r
+ return WRONG;\r
+ }\r
+label:\r
+ newt = t + saved_seconds;\r
+ if ((newt < t) != (saved_seconds < 0))\r
+ return WRONG;\r
+ t = newt;\r
+ (*funcp)(&t, offset, tmp);\r
+ *okayp = TRUE;\r
+ return t;\r
+}\r
+\r
+static time_t\r
+time2(tmp, funcp, offset, okayp)\r
+struct tm * const tmp;\r
+void (* const funcp) P((const time_t*, long, struct tm*));\r
+const long offset;\r
+int * const okayp;\r
+{\r
+ time_t t;\r
+\r
+ /*\r
+ ** First try without normalization of seconds\r
+ ** (in case tm_sec contains a value associated with a leap second).\r
+ ** If that fails, try with normalization of seconds.\r
+ */\r
+ t = time2sub(tmp, funcp, offset, okayp, FALSE);\r
+ return *okayp ? t : time2sub(tmp, funcp, offset, okayp, TRUE);\r
+}\r
+\r
+static time_t\r
+time1(tmp, funcp, offset)\r
+struct tm * const tmp;\r
+void (* const funcp) P((const time_t *, long, struct tm *));\r
+const long offset;\r
+{\r
+ register time_t t;\r
+ register const struct state * sp;\r
+ register int samei, otheri;\r
+ register int sameind, otherind;\r
+ register int i;\r
+ register int nseen;\r
+ int seen[TZ_MAX_TYPES];\r
+ int types[TZ_MAX_TYPES];\r
+ int okay;\r
+\r
+ if (tmp->tm_isdst > 1)\r
+ tmp->tm_isdst = 1;\r
+ t = time2(tmp, funcp, offset, &okay);\r
+#ifdef PCTS\r
+ /*\r
+ */\r
+ if (okay)\r
+ return t;\r
+ if (tmp->tm_isdst < 0)\r
+ tmp->tm_isdst = 0; /* reset to std and try again */\r
+#endif /* defined PCTS */\r
+#ifndef PCTS\r
+ if (okay || tmp->tm_isdst < 0)\r
+ return t;\r
+#endif /* !defined PCTS */\r
+ /*\r
+ ** We're supposed to assume that somebody took a time of one type\r
+ ** and did some math on it that yielded a "struct tm" that's bad.\r
+ ** We try to divine the type they started from and adjust to the\r
+ ** type they need.\r
+ */\r
+ /*\r
+ ** The (void *) casts are the benefit of SunOS 3.3 on Sun 2's.\r
+ */\r
+ sp = (const struct state *) (((void *) funcp == (void *) localsub) ?\r
+ lclptr : gmtptr);\r
+#ifdef ALL_STATE\r
+ if (sp == NULL)\r
+ return WRONG;\r
+#endif /* defined ALL_STATE */\r
+ for (i = 0; i < sp->typecnt; ++i)\r
+ seen[i] = FALSE;\r
+ nseen = 0;\r
+ for (i = sp->timecnt - 1; i >= 0; --i)\r
+ if (!seen[sp->types[i]]) {\r
+ seen[sp->types[i]] = TRUE;\r
+ types[nseen++] = sp->types[i];\r
+ }\r
+ for (sameind = 0; sameind < nseen; ++sameind) {\r
+ samei = types[sameind];\r
+ if (sp->ttis[samei].tt_isdst != tmp->tm_isdst)\r
+ continue;\r
+ for (otherind = 0; otherind < nseen; ++otherind) {\r
+ otheri = types[otherind];\r
+ if (sp->ttis[otheri].tt_isdst == tmp->tm_isdst)\r
+ continue;\r
+ tmp->tm_sec += sp->ttis[otheri].tt_gmtoff -\r
+ sp->ttis[samei].tt_gmtoff;\r
+ tmp->tm_isdst = !tmp->tm_isdst;\r
+ t = time2(tmp, funcp, offset, &okay);\r
+ if (okay)\r
+ return t;\r
+ tmp->tm_sec -= sp->ttis[otheri].tt_gmtoff -\r
+ sp->ttis[samei].tt_gmtoff;\r
+ tmp->tm_isdst = !tmp->tm_isdst;\r
+ }\r
+ }\r
+ return WRONG;\r
+}\r
+\r
+time_t\r
+mktime(tmp)\r
+struct tm * const tmp;\r
+{\r
+ tzset();\r
+ return time1(tmp, localsub, 0L);\r
+}\r
+\r
+#ifdef STD_INSPIRED\r
+\r
+time_t\r
+timelocal(tmp)\r
+struct tm * const tmp;\r
+{\r
+ tmp->tm_isdst = -1; /* in case it wasn't initialized */\r
+ return mktime(tmp);\r
+}\r
+\r
+time_t\r
+timegm(tmp)\r
+struct tm * const tmp;\r
+{\r
+ tmp->tm_isdst = 0;\r
+ return time1(tmp, gmtsub, 0L);\r
+}\r
+\r
+time_t\r
+timeoff(tmp, offset)\r
+struct tm * const tmp;\r
+const long offset;\r
+{\r
+ tmp->tm_isdst = 0;\r
+ return time1(tmp, gmtsub, offset);\r
+}\r
+\r
+#endif /* defined STD_INSPIRED */\r
+\r
+#ifdef CMUCS\r
+\r
+/*\r
+** The following is supplied for compatibility with\r
+** previous versions of the CMUCS runtime library.\r
+*/\r
+\r
+long\r
+gtime(tmp)\r
+struct tm * const tmp;\r
+{\r
+ const time_t t = mktime(tmp);\r
+\r
+ if (t == WRONG)\r
+ return -1;\r
+ return t;\r
+}\r
+\r
+#endif /* defined CMUCS */\r
+\r
+/*\r
+** XXX--is the below the right way to conditionalize??\r
+*/\r
+\r
+#ifdef STD_INSPIRED\r
+\r
+/*\r
+** IEEE Std 1003.1-1988 (POSIX) legislates that 536457599\r
+** shall correspond to "Wed Dec 31 23:59:59 UTC 1986", which\r
+** is not the case if we are accounting for leap seconds.\r
+** So, we provide the following conversion routines for use\r
+** when exchanging timestamps with POSIX conforming systems.\r
+*/\r
+\r
+static long\r
+leapcorr(timep)\r
+time_t * timep;\r
+{\r
+ register struct state * sp;\r
+ register struct lsinfo * lp;\r
+ register int i;\r
+\r
+ sp = lclptr;\r
+ i = sp->leapcnt;\r
+ while (--i >= 0) {\r
+ lp = &sp->lsis[i];\r
+ if (*timep >= lp->ls_trans)\r
+ return lp->ls_corr;\r
+ }\r
+ return 0;\r
+}\r
+\r
+time_t\r
+time2posix(t)\r
+time_t t;\r
+{\r
+ tzset();\r
+ return t - leapcorr(&t);\r
+}\r
+\r
+time_t\r
+posix2time(t)\r
+time_t t;\r
+{\r
+ time_t x;\r
+ time_t y;\r
+\r
+ tzset();\r
+ /*\r
+ ** For a positive leap second hit, the result\r
+ ** is not unique. For a negative leap second\r
+ ** hit, the corresponding time doesn't exist,\r
+ ** so we return an adjacent second.\r
+ */\r
+ x = t + leapcorr(&t);\r
+ y = x - leapcorr(&x);\r
+ if (y < t) {\r
+ do {\r
+ x++;\r
+ y = x - leapcorr(&x);\r
+ } while (y < t);\r
+ if (t != y)\r
+ return x - 1;\r
+ } else if (y > t) {\r
+ do {\r
+ --x;\r
+ y = x - leapcorr(&x);\r
+ } while (y > t);\r
+ if (t != y)\r
+ return x + 1;\r
+ }\r
+ return x;\r
+}\r
+\r
+#endif /* defined STD_INSPIRED */\r
--- /dev/null
+/*-------------------------------------------------------------------------
+ *
+ * pgtz.c
+ * Timezone Library Integration Functions
+ *
+ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * $PostgreSQL: pgsql/src/timezone/pgtz.c,v 1.1 2004/04/30 04:09:23 momjian Exp $
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#include "pgtz.h"
+#include "tzfile.h"
+
+
+#ifdef WIN32
+static char tzdir[MAXPGPATH];
+static int done_tzdir = 0;
+char *pgwin32_TZDIR(void) {
+ char *p;
+ if (done_tzdir)
+ return tzdir;
+
+ if (GetModuleFileName(NULL,tzdir,MAXPGPATH) == 0)
+ return NULL;
+
+ canonicalize_path(tzdir);
+ if ((p = last_path_separator(tzdir)) == NULL)
+ return NULL;
+ else
+ *p = '\0';
+
+ strcat(tzdir,"/../share/timezone");
+
+ done_tzdir=1;
+ return tzdir;
+}
+#else
+#error pgwin32_TZDIR not implemented on non win32 yet!
+#endif
--- /dev/null
+#include "postgres.h"
+
+#define NOID
+#define HAVE_SYMLINK 0
+#define HAVE_SYS_WAIT_H 0
+#define TZDIR pgwin32_TZDIR()
+
+char *pgwin32_TZDIR(void);
--- /dev/null
+#ifndef PRIVATE_H\r
+\r
+#define PRIVATE_H\r
+\r
+/*\r
+** This file is in the public domain, so clarified as of\r
+*/\r
+\r
+/*\r
+** This header is for use ONLY with the time conversion code.\r
+** There is no guarantee that it will remain unchanged,\r
+** or that it will remain at all.\r
+** Do NOT copy it to any system include directory.\r
+** Thank you!\r
+*/\r
+\r
+/*\r
+** ID\r
+*/\r
+\r
+#ifndef lint\r
+#ifndef NOID\r
+static char privatehid[] = "@(#)private.h 7.53";\r
+#endif /* !defined NOID */\r
+#endif /* !defined lint */\r
+\r
+/*\r
+** Defaults for preprocessor symbols.\r
+** You can override these in your C compiler options, e.g. `-DHAVE_ADJTIME=0'.\r
+*/\r
+\r
+#ifndef HAVE_ADJTIME\r
+#define HAVE_ADJTIME 1\r
+#endif /* !defined HAVE_ADJTIME */\r
+\r
+#ifndef HAVE_GETTEXT\r
+#define HAVE_GETTEXT 0\r
+#endif /* !defined HAVE_GETTEXT */\r
+\r
+#ifndef HAVE_INCOMPATIBLE_CTIME_R\r
+#define HAVE_INCOMPATIBLE_CTIME_R 0\r
+#endif /* !defined INCOMPATIBLE_CTIME_R */\r
+\r
+#ifndef HAVE_SETTIMEOFDAY\r
+#define HAVE_SETTIMEOFDAY 3\r
+#endif /* !defined HAVE_SETTIMEOFDAY */\r
+\r
+#ifndef HAVE_STRERROR\r
+#define HAVE_STRERROR 1\r
+#endif /* !defined HAVE_STRERROR */\r
+\r
+#ifndef HAVE_SYMLINK\r
+#define HAVE_SYMLINK 1\r
+#endif /* !defined HAVE_SYMLINK */\r
+\r
+#ifndef HAVE_SYS_STAT_H\r
+#define HAVE_SYS_STAT_H 1\r
+#endif /* !defined HAVE_SYS_STAT_H */\r
+\r
+#ifndef HAVE_SYS_WAIT_H\r
+#define HAVE_SYS_WAIT_H 1\r
+#endif /* !defined HAVE_SYS_WAIT_H */\r
+\r
+#ifndef HAVE_UNISTD_H\r
+#define HAVE_UNISTD_H 1\r
+#endif /* !defined HAVE_UNISTD_H */\r
+\r
+#ifndef HAVE_UTMPX_H\r
+#define HAVE_UTMPX_H 0\r
+#endif /* !defined HAVE_UTMPX_H */\r
+\r
+#ifndef LOCALE_HOME\r
+#define LOCALE_HOME "/usr/lib/locale"\r
+#endif /* !defined LOCALE_HOME */\r
+\r
+#if HAVE_INCOMPATIBLE_CTIME_R\r
+#define asctime_r _incompatible_asctime_r\r
+#define ctime_r _incompatible_ctime_r\r
+#endif /* HAVE_INCOMPATIBLE_CTIME_R */\r
+\r
+/*\r
+** Nested includes\r
+*/\r
+\r
+#include "sys/types.h" /* for time_t */\r
+#include "stdio.h"\r
+#include "errno.h"\r
+#include "string.h"\r
+#include "limits.h" /* for CHAR_BIT */\r
+#include "time.h"\r
+#include "stdlib.h"\r
+\r
+#if HAVE_GETTEXT - 0\r
+#include "libintl.h"\r
+#endif /* HAVE_GETTEXT - 0 */\r
+\r
+#if HAVE_SYS_WAIT_H - 0\r
+#include /* for WIFEXITED and WEXITSTATUS */\r
+#endif /* HAVE_SYS_WAIT_H - 0 */\r
+\r
+#ifndef WIFEXITED\r
+#define WIFEXITED(status) (((status) & 0xff) == 0)\r
+#endif /* !defined WIFEXITED */\r
+#ifndef WEXITSTATUS\r
+#define WEXITSTATUS(status) (((status) >> 8) & 0xff)\r
+#endif /* !defined WEXITSTATUS */\r
+\r
+#if HAVE_UNISTD_H - 0\r
+#include "unistd.h" /* for F_OK and R_OK */\r
+#endif /* HAVE_UNISTD_H - 0 */\r
+\r
+#if !(HAVE_UNISTD_H - 0)\r
+#ifndef F_OK\r
+#define F_OK 0\r
+#endif /* !defined F_OK */\r
+#ifndef R_OK\r
+#define R_OK 4\r
+#endif /* !defined R_OK */\r
+#endif /* !(HAVE_UNISTD_H - 0) */\r
+\r
+/* Unlike 's isdigit, this also works if c < 0 | c > UCHAR_MAX. */\r
+#define is_digit(c) ((unsigned)(c) - '0' <= 9)\r
+\r
+/*\r
+** Workarounds for compilers/systems.\r
+*/\r
+\r
+/*\r
+** SunOS 4.1.1 cc lacks prototypes.\r
+*/\r
+\r
+#ifndef P\r
+#ifdef __STDC__\r
+#define P(x) x\r
+#endif /* defined __STDC__ */\r
+#ifndef __STDC__\r
+#define P(x) ()\r
+#endif /* !defined __STDC__ */\r
+#endif /* !defined P */\r
+\r
+/*\r
+** SunOS 4.1.1 headers lack EXIT_SUCCESS.\r
+*/\r
+\r
+#ifndef EXIT_SUCCESS\r
+#define EXIT_SUCCESS 0\r
+#endif /* !defined EXIT_SUCCESS */\r
+\r
+/*\r
+** SunOS 4.1.1 headers lack EXIT_FAILURE.\r
+*/\r
+\r
+#ifndef EXIT_FAILURE\r
+#define EXIT_FAILURE 1\r
+#endif /* !defined EXIT_FAILURE */\r
+\r
+/*\r
+** SunOS 4.1.1 headers lack FILENAME_MAX.\r
+*/\r
+\r
+#ifndef FILENAME_MAX\r
+\r
+#ifndef MAXPATHLEN\r
+#ifdef unix\r
+#include "sys/param.h"\r
+#endif /* defined unix */\r
+#endif /* !defined MAXPATHLEN */\r
+\r
+#ifdef MAXPATHLEN\r
+#define FILENAME_MAX MAXPATHLEN\r
+#endif /* defined MAXPATHLEN */\r
+#ifndef MAXPATHLEN\r
+#define FILENAME_MAX 1024 /* Pure guesswork */\r
+#endif /* !defined MAXPATHLEN */\r
+\r
+#endif /* !defined FILENAME_MAX */\r
+\r
+/*\r
+** SunOS 4.1.1 libraries lack remove.\r
+*/\r
+\r
+#ifndef remove\r
+extern int unlink P((const char * filename));\r
+#define remove unlink\r
+#endif /* !defined remove */\r
+\r
+/*\r
+** Some ancient errno.h implementations don't declare errno.\r
+** But some newer errno.h implementations define it as a macro.\r
+** Fix the former without affecting the latter.\r
+*/\r
+#ifndef errno\r
+extern int errno;\r
+#endif /* !defined errno */\r
+\r
+/*\r
+** Private function declarations.\r
+*/\r
+char * icalloc P((int nelem, int elsize));\r
+char * icatalloc P((char * old, const char * new));\r
+char * icpyalloc P((const char * string));\r
+char * imalloc P((int n));\r
+void * irealloc P((void * pointer, int size));\r
+void icfree P((char * pointer));\r
+void ifree P((char * pointer));\r
+char * scheck P((const char *string, const char *format));\r
+\r
+\r
+/*\r
+** Finally, some convenience items.\r
+*/\r
+\r
+#ifndef TRUE\r
+#define TRUE 1\r
+#endif /* !defined TRUE */\r
+\r
+#ifndef FALSE\r
+#define FALSE 0\r
+#endif /* !defined FALSE */\r
+\r
+#ifndef TYPE_BIT\r
+#define TYPE_BIT(type) (sizeof (type) * CHAR_BIT)\r
+#endif /* !defined TYPE_BIT */\r
+\r
+#ifndef TYPE_SIGNED\r
+#define TYPE_SIGNED(type) (((type) -1) < 0)\r
+#endif /* !defined TYPE_SIGNED */\r
+\r
+#ifndef INT_STRLEN_MAXIMUM\r
+/*\r
+** 302 / 1000 is log10(2.0) rounded up.\r
+** Subtract one for the sign bit if the type is signed;\r
+** add one for integer division truncation;\r
+** add one more for a minus sign if the type is signed.\r
+*/\r
+#define INT_STRLEN_MAXIMUM(type) \\r
+ ((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + 1 + TYPE_SIGNED(type))\r
+#endif /* !defined INT_STRLEN_MAXIMUM */\r
+\r
+/*\r
+** INITIALIZE(x)\r
+*/\r
+\r
+#ifndef GNUC_or_lint\r
+#ifdef lint\r
+#define GNUC_or_lint\r
+#endif /* defined lint */\r
+#ifndef lint\r
+#ifdef __GNUC__\r
+#define GNUC_or_lint\r
+#endif /* defined __GNUC__ */\r
+#endif /* !defined lint */\r
+#endif /* !defined GNUC_or_lint */\r
+\r
+#ifndef INITIALIZE\r
+#ifdef GNUC_or_lint\r
+#define INITIALIZE(x) ((x) = 0)\r
+#endif /* defined GNUC_or_lint */\r
+#ifndef GNUC_or_lint\r
+#define INITIALIZE(x)\r
+#endif /* !defined GNUC_or_lint */\r
+#endif /* !defined INITIALIZE */\r
+\r
+/*\r
+** For the benefit of GNU folk...\r
+** `_(MSGID)' uses the current locale's message library string for MSGID.\r
+** The default is to use gettext if available, and use MSGID otherwise.\r
+*/\r
+\r
+#ifndef _\r
+#if HAVE_GETTEXT - 0\r
+#define _(msgid) gettext(msgid)\r
+#else /* !(HAVE_GETTEXT - 0) */\r
+#define _(msgid) msgid\r
+#endif /* !(HAVE_GETTEXT - 0) */\r
+#endif /* !defined _ */\r
+\r
+#ifndef TZ_DOMAIN\r
+#define TZ_DOMAIN "tz"\r
+#endif /* !defined TZ_DOMAIN */\r
+\r
+#if HAVE_INCOMPATIBLE_CTIME_R\r
+#undef asctime_r\r
+#undef ctime_r\r
+char *asctime_r P((struct tm const *, char *));\r
+char *ctime_r P((time_t const *, char *));\r
+#endif /* HAVE_INCOMPATIBLE_CTIME_R */\r
+\r
+/*\r
+** UNIX was a registered trademark of The Open Group in 2003.\r
+*/\r
+\r
+#endif /* !defined PRIVATE_H */\r
--- /dev/null
+#ifndef lint\r
+#ifndef NOID\r
+static char elsieid[] = "@(#)scheck.c 8.15";\r
+#endif /* !defined lint */\r
+#endif /* !defined NOID */\r
+\r
+/*LINTLIBRARY*/\r
+\r
+#include "private.h"\r
+\r
+char *\r
+scheck(string, format)\r
+const char * const string;\r
+const char * const format;\r
+{\r
+ register char * fbuf;\r
+ register const char * fp;\r
+ register char * tp;\r
+ register int c;\r
+ register char * result;\r
+ char dummy;\r
+ static char nada;\r
+\r
+ result = &nada;\r
+ if (string == NULL || format == NULL)\r
+ return result;\r
+ fbuf = imalloc((int) (2 * strlen(format) + 4));\r
+ if (fbuf == NULL)\r
+ return result;\r
+ fp = format;\r
+ tp = fbuf;\r
+ while ((*tp++ = c = *fp++) != '\0') {\r
+ if (c != '%')\r
+ continue;\r
+ if (*fp == '%') {\r
+ *tp++ = *fp++;\r
+ continue;\r
+ }\r
+ *tp++ = '*';\r
+ if (*fp == '*')\r
+ ++fp;\r
+ while (is_digit(*fp))\r
+ *tp++ = *fp++;\r
+ if (*fp == 'l' || *fp == 'h')\r
+ *tp++ = *fp++;\r
+ else if (*fp == '[')\r
+ do *tp++ = *fp++;\r
+ while (*fp != '\0' && *fp != ']');\r
+ if ((*tp++ = *fp++) == '\0')\r
+ break;\r
+ }\r
+ *(tp - 1) = '%';\r
+ *tp++ = 'c';\r
+ *tp = '\0';\r
+ if (sscanf(string, fbuf, &dummy) != 1)\r
+ result = (char *) format;\r
+ ifree(fbuf);\r
+ return result;\r
+}\r
--- /dev/null
+#ifndef TZFILE_H\r
+\r
+#define TZFILE_H\r
+\r
+/*\r
+** This file is in the public domain, so clarified as of\r
+*/\r
+\r
+/*\r
+** This header is for use ONLY with the time conversion code.\r
+** There is no guarantee that it will remain unchanged,\r
+** or that it will remain at all.\r
+** Do NOT copy it to any system include directory.\r
+** Thank you!\r
+*/\r
+\r
+/*\r
+** ID\r
+*/\r
+\r
+#ifndef lint\r
+#ifndef NOID\r
+static char tzfilehid[] = "@(#)tzfile.h 7.14";\r
+#endif /* !defined NOID */\r
+#endif /* !defined lint */\r
+\r
+/*\r
+** Information about time zone files.\r
+*/\r
+\r
+#ifndef TZDIR\r
+#define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */\r
+#endif /* !defined TZDIR */\r
+\r
+#ifndef TZDEFAULT\r
+#define TZDEFAULT "localtime"\r
+#endif /* !defined TZDEFAULT */\r
+\r
+#ifndef TZDEFRULES\r
+#define TZDEFRULES "posixrules"\r
+#endif /* !defined TZDEFRULES */\r
+\r
+/*\r
+** Each file begins with. . .\r
+*/\r
+\r
+#define TZ_MAGIC "TZif"\r
+\r
+struct tzhead {\r
+ char tzh_magic[4]; /* TZ_MAGIC */\r
+ char tzh_reserved[16]; /* reserved for future use */\r
+ char tzh_ttisgmtcnt[4]; /* coded number of trans. time flags */\r
+ char tzh_ttisstdcnt[4]; /* coded number of trans. time flags */\r
+ char tzh_leapcnt[4]; /* coded number of leap seconds */\r
+ char tzh_timecnt[4]; /* coded number of transition times */\r
+ char tzh_typecnt[4]; /* coded number of local time types */\r
+ char tzh_charcnt[4]; /* coded number of abbr. chars */\r
+};\r
+\r
+/*\r
+** . . .followed by. . .\r
+**\r
+** tzh_timecnt (char [4])s coded transition times a la time(2)\r
+** tzh_timecnt (unsigned char)s types of local time starting at above\r
+** tzh_typecnt repetitions of\r
+** one (char [4]) coded UTC offset in seconds\r
+** one (unsigned char) used to set tm_isdst\r
+** one (unsigned char) that's an abbreviation list index\r
+** tzh_charcnt (char)s '\0'-terminated zone abbreviations\r
+** tzh_leapcnt repetitions of\r
+** one (char [4]) coded leap second transition times\r
+** one (char [4]) total correction after above\r
+** tzh_ttisstdcnt (char)s indexed by type; if TRUE, transition\r
+** time is standard time, if FALSE,\r
+** transition time is wall clock time\r
+** if absent, transition times are\r
+** assumed to be wall clock time\r
+** tzh_ttisgmtcnt (char)s indexed by type; if TRUE, transition\r
+** time is UTC, if FALSE,\r
+** transition time is local time\r
+** if absent, transition times are\r
+** assumed to be local time\r
+*/\r
+\r
+/*\r
+** In the current implementation, "tzset()" refuses to deal with files that\r
+** exceed any of the limits below.\r
+*/\r
+\r
+#ifndef TZ_MAX_TIMES\r
+/*\r
+** The TZ_MAX_TIMES value below is enough to handle a bit more than a\r
+** year's worth of solar time (corrected daily to the nearest second) or\r
+** 138 years of Pacific Presidential Election time\r
+** (where there are three time zone transitions every fourth year).\r
+*/\r
+#define TZ_MAX_TIMES 370\r
+#endif /* !defined TZ_MAX_TIMES */\r
+\r
+#ifndef TZ_MAX_TYPES\r
+#ifndef NOSOLAR\r
+#define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */\r
+#endif /* !defined NOSOLAR */\r
+#ifdef NOSOLAR\r
+/*\r
+** Must be at least 14 for Europe/Riga as of Jan 12 1995,\r
+** as noted by Earl Chew .\r
+*/\r
+#define TZ_MAX_TYPES 20 /* Maximum number of local time types */\r
+#endif /* !defined NOSOLAR */\r
+#endif /* !defined TZ_MAX_TYPES */\r
+\r
+#ifndef TZ_MAX_CHARS\r
+#define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */\r
+ /* (limited by what unsigned chars can hold) */\r
+#endif /* !defined TZ_MAX_CHARS */\r
+\r
+#ifndef TZ_MAX_LEAPS\r
+#define TZ_MAX_LEAPS 50 /* Maximum number of leap second corrections */\r
+#endif /* !defined TZ_MAX_LEAPS */\r
+\r
+#define SECSPERMIN 60\r
+#define MINSPERHOUR 60\r
+#define HOURSPERDAY 24\r
+#define DAYSPERWEEK 7\r
+#define DAYSPERNYEAR 365\r
+#define DAYSPERLYEAR 366\r
+#define SECSPERHOUR (SECSPERMIN * MINSPERHOUR)\r
+#define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY)\r
+#define MONSPERYEAR 12\r
+\r
+#define TM_SUNDAY 0\r
+#define TM_MONDAY 1\r
+#define TM_TUESDAY 2\r
+#define TM_WEDNESDAY 3\r
+#define TM_THURSDAY 4\r
+#define TM_FRIDAY 5\r
+#define TM_SATURDAY 6\r
+\r
+#define TM_JANUARY 0\r
+#define TM_FEBRUARY 1\r
+#define TM_MARCH 2\r
+#define TM_APRIL 3\r
+#define TM_MAY 4\r
+#define TM_JUNE 5\r
+#define TM_JULY 6\r
+#define TM_AUGUST 7\r
+#define TM_SEPTEMBER 8\r
+#define TM_OCTOBER 9\r
+#define TM_NOVEMBER 10\r
+#define TM_DECEMBER 11\r
+\r
+#define TM_YEAR_BASE 1900\r
+\r
+#define EPOCH_YEAR 1970\r
+#define EPOCH_WDAY TM_THURSDAY\r
+\r
+/*\r
+** Accurate only for the past couple of centuries;\r
+** that will probably do.\r
+*/\r
+\r
+#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))\r
+\r
+#ifndef USG\r
+\r
+/*\r
+** Use of the underscored variants may cause problems if you move your code to\r
+** certain System-V-based systems; for maximum portability, use the\r
+** underscore-free variants. The underscored variants are provided for\r
+** backward compatibility only; they may disappear from future versions of\r
+** this file.\r
+*/\r
+\r
+#define SECS_PER_MIN SECSPERMIN\r
+#define MINS_PER_HOUR MINSPERHOUR\r
+#define HOURS_PER_DAY HOURSPERDAY\r
+#define DAYS_PER_WEEK DAYSPERWEEK\r
+#define DAYS_PER_NYEAR DAYSPERNYEAR\r
+#define DAYS_PER_LYEAR DAYSPERLYEAR\r
+#define SECS_PER_HOUR SECSPERHOUR\r
+#define SECS_PER_DAY SECSPERDAY\r
+#define MONS_PER_YEAR MONSPERYEAR\r
+\r
+#endif /* !defined USG */\r
+\r
+#endif /* !defined TZFILE_H */\r
--- /dev/null
+static char elsieid[] = "@(#)zic.c 7.115";\r
+\r
+#include "private.h"\r
+#include "locale.h"\r
+#include "tzfile.h"\r
+\r
+#if HAVE_SYS_STAT_H\r
+#include "sys/stat.h"\r
+#endif\r
+#ifdef S_IRUSR\r
+#define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)\r
+#else\r
+#define MKDIR_UMASK 0755\r
+#endif\r
+\r
+/*\r
+** On some ancient hosts, predicates like `isspace(C)' are defined\r
+** only if isascii(C) || C == EOF. Modern hosts obey the C Standard,\r
+** which says they are defined only if C == ((unsigned char) C) || C == EOF.\r
+** Neither the C Standard nor Posix require that `isascii' exist.\r
+** For portability, we check both ancient and modern requirements.\r
+** If isascii is not defined, the isascii check succeeds trivially.\r
+*/\r
+#include "ctype.h"\r
+#ifndef isascii\r
+#define isascii(x) 1\r
+#endif\r
+\r
+struct rule {\r
+ const char * r_filename;\r
+ int r_linenum;\r
+ const char * r_name;\r
+\r
+ int r_loyear; /* for example, 1986 */\r
+ int r_hiyear; /* for example, 1986 */\r
+ const char * r_yrtype;\r
+\r
+ int r_month; /* 0..11 */\r
+\r
+ int r_dycode; /* see below */\r
+ int r_dayofmonth;\r
+ int r_wday;\r
+\r
+ long r_tod; /* time from midnight */\r
+ int r_todisstd; /* above is standard time if TRUE */\r
+ /* or wall clock time if FALSE */\r
+ int r_todisgmt; /* above is GMT if TRUE */\r
+ /* or local time if FALSE */\r
+ long r_stdoff; /* offset from standard time */\r
+ const char * r_abbrvar; /* variable part of abbreviation */\r
+\r
+ int r_todo; /* a rule to do (used in outzone) */\r
+ time_t r_temp; /* used in outzone */\r
+};\r
+\r
+/*\r
+** r_dycode r_dayofmonth r_wday\r
+*/\r
+\r
+#define DC_DOM 0 /* 1..31 */ /* unused */\r
+#define DC_DOWGEQ 1 /* 1..31 */ /* 0..6 (Sun..Sat) */\r
+#define DC_DOWLEQ 2 /* 1..31 */ /* 0..6 (Sun..Sat) */\r
+\r
+struct zone {\r
+ const char * z_filename;\r
+ int z_linenum;\r
+\r
+ const char * z_name;\r
+ long z_gmtoff;\r
+ const char * z_rule;\r
+ const char * z_format;\r
+\r
+ long z_stdoff;\r
+\r
+ struct rule * z_rules;\r
+ int z_nrules;\r
+\r
+ struct rule z_untilrule;\r
+ time_t z_untiltime;\r
+};\r
+\r
+extern int getopt P((int argc, char * const argv[],\r
+ const char * options));\r
+extern int link P((const char * fromname, const char * toname));\r
+extern char * optarg;\r
+extern int optind;\r
+\r
+static void addtt P((time_t starttime, int type));\r
+static int addtype P((long gmtoff, const char * abbr, int isdst,\r
+ int ttisstd, int ttisgmt));\r
+static void leapadd P((time_t t, int positive, int rolling, int count));\r
+static void adjleap P((void));\r
+static void associate P((void));\r
+static int ciequal P((const char * ap, const char * bp));\r
+static void convert P((long val, char * buf));\r
+static void dolink P((const char * fromfile, const char * tofile));\r
+static void doabbr P((char * abbr, const char * format,\r
+ const char * letters, int isdst));\r
+static void eat P((const char * name, int num));\r
+static void eats P((const char * name, int num,\r
+ const char * rname, int rnum));\r
+static long eitol P((int i));\r
+static void error P((const char * message));\r
+static char ** getfields P((char * buf));\r
+static long gethms P((const char * string, const char * errstrng,\r
+ int signable));\r
+static void infile P((const char * filename));\r
+static void inleap P((char ** fields, int nfields));\r
+static void inlink P((char ** fields, int nfields));\r
+static void inrule P((char ** fields, int nfields));\r
+static int inzcont P((char ** fields, int nfields));\r
+static int inzone P((char ** fields, int nfields));\r
+static int inzsub P((char ** fields, int nfields, int iscont));\r
+static int itsabbr P((const char * abbr, const char * word));\r
+static int itsdir P((const char * name));\r
+static int lowerit P((int c));\r
+static char * memcheck P((char * tocheck));\r
+static int mkdirs P((char * filename));\r
+static void newabbr P((const char * abbr));\r
+static long oadd P((long t1, long t2));\r
+static void outzone P((const struct zone * zp, int ntzones));\r
+static void puttzcode P((long code, FILE * fp));\r
+static int rcomp P((const void * leftp, const void * rightp));\r
+static time_t rpytime P((const struct rule * rp, int wantedy));\r
+static void rulesub P((struct rule * rp,\r
+ const char * loyearp, const char * hiyearp,\r
+ const char * typep, const char * monthp,\r
+ const char * dayp, const char * timep));\r
+static void setboundaries P((void));\r
+static time_t tadd P((time_t t1, long t2));\r
+static void usage P((void));\r
+static void writezone P((const char * name));\r
+static int yearistype P((int year, const char * type));\r
+\r
+#if !(HAVE_STRERROR - 0)\r
+static char * strerror P((int));\r
+#endif /* !(HAVE_STRERROR - 0) */\r
+\r
+static int charcnt;\r
+static int errors;\r
+static const char * filename;\r
+static int leapcnt;\r
+static int linenum;\r
+static time_t max_time;\r
+static int max_year;\r
+static int max_year_representable;\r
+static time_t min_time;\r
+static int min_year;\r
+static int min_year_representable;\r
+static int noise;\r
+static const char * rfilename;\r
+static int rlinenum;\r
+static const char * progname;\r
+static int timecnt;\r
+static int typecnt;\r
+\r
+/*\r
+** Line codes.\r
+*/\r
+\r
+#define LC_RULE 0\r
+#define LC_ZONE 1\r
+#define LC_LINK 2\r
+#define LC_LEAP 3\r
+\r
+/*\r
+** Which fields are which on a Zone line.\r
+*/\r
+\r
+#define ZF_NAME 1\r
+#define ZF_GMTOFF 2\r
+#define ZF_RULE 3\r
+#define ZF_FORMAT 4\r
+#define ZF_TILYEAR 5\r
+#define ZF_TILMONTH 6\r
+#define ZF_TILDAY 7\r
+#define ZF_TILTIME 8\r
+#define ZONE_MINFIELDS 5\r
+#define ZONE_MAXFIELDS 9\r
+\r
+/*\r
+** Which fields are which on a Zone continuation line.\r
+*/\r
+\r
+#define ZFC_GMTOFF 0\r
+#define ZFC_RULE 1\r
+#define ZFC_FORMAT 2\r
+#define ZFC_TILYEAR 3\r
+#define ZFC_TILMONTH 4\r
+#define ZFC_TILDAY 5\r
+#define ZFC_TILTIME 6\r
+#define ZONEC_MINFIELDS 3\r
+#define ZONEC_MAXFIELDS 7\r
+\r
+/*\r
+** Which files are which on a Rule line.\r
+*/\r
+\r
+#define RF_NAME 1\r
+#define RF_LOYEAR 2\r
+#define RF_HIYEAR 3\r
+#define RF_COMMAND 4\r
+#define RF_MONTH 5\r
+#define RF_DAY 6\r
+#define RF_TOD 7\r
+#define RF_STDOFF 8\r
+#define RF_ABBRVAR 9\r
+#define RULE_FIELDS 10\r
+\r
+/*\r
+** Which fields are which on a Link line.\r
+*/\r
+\r
+#define LF_FROM 1\r
+#define LF_TO 2\r
+#define LINK_FIELDS 3\r
+\r
+/*\r
+** Which fields are which on a Leap line.\r
+*/\r
+\r
+#define LP_YEAR 1\r
+#define LP_MONTH 2\r
+#define LP_DAY 3\r
+#define LP_TIME 4\r
+#define LP_CORR 5\r
+#define LP_ROLL 6\r
+#define LEAP_FIELDS 7\r
+\r
+/*\r
+** Year synonyms.\r
+*/\r
+\r
+#define YR_MINIMUM 0\r
+#define YR_MAXIMUM 1\r
+#define YR_ONLY 2\r
+\r
+static struct rule * rules;\r
+static int nrules; /* number of rules */\r
+\r
+static struct zone * zones;\r
+static int nzones; /* number of zones */\r
+\r
+struct link {\r
+ const char * l_filename;\r
+ int l_linenum;\r
+ const char * l_from;\r
+ const char * l_to;\r
+};\r
+\r
+static struct link * links;\r
+static int nlinks;\r
+\r
+struct lookup {\r
+ const char * l_word;\r
+ const int l_value;\r
+};\r
+\r
+static struct lookup const * byword P((const char * string,\r
+ const struct lookup * lp));\r
+\r
+static struct lookup const line_codes[] = {\r
+ { "Rule", LC_RULE },\r
+ { "Zone", LC_ZONE },\r
+ { "Link", LC_LINK },\r
+ { "Leap", LC_LEAP },\r
+ { NULL, 0}\r
+};\r
+\r
+static struct lookup const mon_names[] = {\r
+ { "January", TM_JANUARY },\r
+ { "February", TM_FEBRUARY },\r
+ { "March", TM_MARCH },\r
+ { "April", TM_APRIL },\r
+ { "May", TM_MAY },\r
+ { "June", TM_JUNE },\r
+ { "July", TM_JULY },\r
+ { "August", TM_AUGUST },\r
+ { "September", TM_SEPTEMBER },\r
+ { "October", TM_OCTOBER },\r
+ { "November", TM_NOVEMBER },\r
+ { "December", TM_DECEMBER },\r
+ { NULL, 0 }\r
+};\r
+\r
+static struct lookup const wday_names[] = {\r
+ { "Sunday", TM_SUNDAY },\r
+ { "Monday", TM_MONDAY },\r
+ { "Tuesday", TM_TUESDAY },\r
+ { "Wednesday", TM_WEDNESDAY },\r
+ { "Thursday", TM_THURSDAY },\r
+ { "Friday", TM_FRIDAY },\r
+ { "Saturday", TM_SATURDAY },\r
+ { NULL, 0 }\r
+};\r
+\r
+static struct lookup const lasts[] = {\r
+ { "last-Sunday", TM_SUNDAY },\r
+ { "last-Monday", TM_MONDAY },\r
+ { "last-Tuesday", TM_TUESDAY },\r
+ { "last-Wednesday", TM_WEDNESDAY },\r
+ { "last-Thursday", TM_THURSDAY },\r
+ { "last-Friday", TM_FRIDAY },\r
+ { "last-Saturday", TM_SATURDAY },\r
+ { NULL, 0 }\r
+};\r
+\r
+static struct lookup const begin_years[] = {\r
+ { "minimum", YR_MINIMUM },\r
+ { "maximum", YR_MAXIMUM },\r
+ { NULL, 0 }\r
+};\r
+\r
+static struct lookup const end_years[] = {\r
+ { "minimum", YR_MINIMUM },\r
+ { "maximum", YR_MAXIMUM },\r
+ { "only", YR_ONLY },\r
+ { NULL, 0 }\r
+};\r
+\r
+static struct lookup const leap_types[] = {\r
+ { "Rolling", TRUE },\r
+ { "Stationary", FALSE },\r
+ { NULL, 0 }\r
+};\r
+\r
+static const int len_months[2][MONSPERYEAR] = {\r
+ { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 },\r
+ { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }\r
+};\r
+\r
+static const int len_years[2] = {\r
+ DAYSPERNYEAR, DAYSPERLYEAR\r
+};\r
+\r
+static struct attype {\r
+ time_t at;\r
+ unsigned char type;\r
+} attypes[TZ_MAX_TIMES];\r
+static long gmtoffs[TZ_MAX_TYPES];\r
+static char isdsts[TZ_MAX_TYPES];\r
+static unsigned char abbrinds[TZ_MAX_TYPES];\r
+static char ttisstds[TZ_MAX_TYPES];\r
+static char ttisgmts[TZ_MAX_TYPES];\r
+static char chars[TZ_MAX_CHARS];\r
+static time_t trans[TZ_MAX_LEAPS];\r
+static long corr[TZ_MAX_LEAPS];\r
+static char roll[TZ_MAX_LEAPS];\r
+\r
+/*\r
+** Memory allocation.\r
+*/\r
+\r
+static char *\r
+memcheck(ptr)\r
+char * const ptr;\r
+{\r
+ if (ptr == NULL) {\r
+ const char *e = strerror(errno);\r
+\r
+ (void) fprintf(stderr, _("%s: Memory exhausted: %s\n"),\r
+ progname, e);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ return ptr;\r
+}\r
+\r
+#define emalloc(size) memcheck(imalloc(size))\r
+#define erealloc(ptr, size) memcheck(irealloc((ptr), (size)))\r
+#define ecpyalloc(ptr) memcheck(icpyalloc(ptr))\r
+#define ecatalloc(oldp, newp) memcheck(icatalloc((oldp), (newp)))\r
+\r
+/*\r
+** Error handling.\r
+*/\r
+\r
+#if !(HAVE_STRERROR - 0)\r
+static char *\r
+strerror(errnum)\r
+int errnum;\r
+{\r
+ extern char * sys_errlist[];\r
+ extern int sys_nerr;\r
+\r
+ return (errnum > 0 && errnum <= sys_nerr) ?\r
+ sys_errlist[errnum] : _("Unknown system error");\r
+}\r
+#endif /* !(HAVE_STRERROR - 0) */\r
+\r
+static void\r
+eats(name, num, rname, rnum)\r
+const char * const name;\r
+const int num;\r
+const char * const rname;\r
+const int rnum;\r
+{\r
+ filename = name;\r
+ linenum = num;\r
+ rfilename = rname;\r
+ rlinenum = rnum;\r
+}\r
+\r
+static void\r
+eat(name, num)\r
+const char * const name;\r
+const int num;\r
+{\r
+ eats(name, num, (char *) NULL, -1);\r
+}\r
+\r
+static void\r
+error(string)\r
+const char * const string;\r
+{\r
+ /*\r
+ ** Match the format of "cc" to allow sh users to\r
+ ** zic ... 2>&1 | error -t "*" -v\r
+ ** on BSD systems.\r
+ */\r
+ (void) fprintf(stderr, _("\"%s\", line %d: %s"),\r
+ filename, linenum, string);\r
+ if (rfilename != NULL)\r
+ (void) fprintf(stderr, _(" (rule from \"%s\", line %d)"),\r
+ rfilename, rlinenum);\r
+ (void) fprintf(stderr, "\n");\r
+ ++errors;\r
+}\r
+\r
+static void\r
+warning(string)\r
+const char * const string;\r
+{\r
+ char * cp;\r
+\r
+ cp = ecpyalloc(_("warning: "));\r
+ cp = ecatalloc(cp, string);\r
+ error(cp);\r
+ ifree(cp);\r
+ --errors;\r
+}\r
+\r
+static void\r
+usage P((void))\r
+{\r
+ (void) fprintf(stderr, _("%s: usage is %s [ --version ] [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"),\r
+ progname, progname);\r
+ (void) exit(EXIT_FAILURE);\r
+}\r
+\r
+static const char * psxrules;\r
+static const char * lcltime;\r
+static const char * directory;\r
+static const char * leapsec;\r
+static const char * yitcommand;\r
+static int sflag = FALSE;\r
+\r
+int\r
+main(argc, argv)\r
+int argc;\r
+char * argv[];\r
+{\r
+ register int i;\r
+ register int j;\r
+ register int c;\r
+\r
+#ifdef unix\r
+ (void) umask(umask(S_IWGRP | S_IWOTH) | (S_IWGRP | S_IWOTH));\r
+#endif /* defined unix */\r
+#if HAVE_GETTEXT - 0\r
+ (void) setlocale(LC_MESSAGES, "");\r
+#ifdef TZ_DOMAINDIR\r
+ (void) bindtextdomain(TZ_DOMAIN, TZ_DOMAINDIR);\r
+#endif /* defined TEXTDOMAINDIR */\r
+ (void) textdomain(TZ_DOMAIN);\r
+#endif /* HAVE_GETTEXT - 0 */\r
+ progname = argv[0];\r
+ for (i = 1; i < argc; ++i)\r
+ if (strcmp(argv[i], "--version") == 0) {\r
+ (void) printf("%s\n", elsieid);\r
+ (void) exit(EXIT_SUCCESS);\r
+ }\r
+ while ((c = getopt(argc, argv, "d:l:p:L:vsy:")) != EOF && c != -1)\r
+ switch (c) {\r
+ default:\r
+ usage();\r
+ case 'd':\r
+ if (directory == NULL)\r
+ directory = optarg;\r
+ else {\r
+ (void) fprintf(stderr,\r
+_("%s: More than one -d option specified\n"),\r
+ progname);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ break;\r
+ case 'l':\r
+ if (lcltime == NULL)\r
+ lcltime = optarg;\r
+ else {\r
+ (void) fprintf(stderr,\r
+_("%s: More than one -l option specified\n"),\r
+ progname);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ break;\r
+ case 'p':\r
+ if (psxrules == NULL)\r
+ psxrules = optarg;\r
+ else {\r
+ (void) fprintf(stderr,\r
+_("%s: More than one -p option specified\n"),\r
+ progname);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ break;\r
+ case 'y':\r
+ if (yitcommand == NULL)\r
+ yitcommand = optarg;\r
+ else {\r
+ (void) fprintf(stderr,\r
+_("%s: More than one -y option specified\n"),\r
+ progname);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ break;\r
+ case 'L':\r
+ if (leapsec == NULL)\r
+ leapsec = optarg;\r
+ else {\r
+ (void) fprintf(stderr,\r
+_("%s: More than one -L option specified\n"),\r
+ progname);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ break;\r
+ case 'v':\r
+ noise = TRUE;\r
+ break;\r
+ case 's':\r
+ sflag = TRUE;\r
+ break;\r
+ }\r
+ if (optind == argc - 1 && strcmp(argv[optind], "=") == 0)\r
+ usage(); /* usage message by request */\r
+ if (directory == NULL)\r
+ directory = TZDIR;\r
+ if (yitcommand == NULL)\r
+ yitcommand = "yearistype";\r
+\r
+ setboundaries();\r
+\r
+ if (optind < argc && leapsec != NULL) {\r
+ infile(leapsec);\r
+ adjleap();\r
+ }\r
+\r
+ for (i = optind; i < argc; ++i)\r
+ infile(argv[i]);\r
+ if (errors)\r
+ (void) exit(EXIT_FAILURE);\r
+ associate();\r
+ for (i = 0; i < nzones; i = j) {\r
+ /*\r
+ ** Find the next non-continuation zone entry.\r
+ */\r
+ for (j = i + 1; j < nzones && zones[j].z_name == NULL; ++j)\r
+ continue;\r
+ outzone(&zones[i], j - i);\r
+ }\r
+ /*\r
+ ** Make links.\r
+ */\r
+ for (i = 0; i < nlinks; ++i) {\r
+ eat(links[i].l_filename, links[i].l_linenum);\r
+ dolink(links[i].l_from, links[i].l_to);\r
+ }\r
+ if (lcltime != NULL) {\r
+ eat("command line", 1);\r
+ dolink(lcltime, TZDEFAULT);\r
+ }\r
+ if (psxrules != NULL) {\r
+ eat("command line", 1);\r
+ dolink(psxrules, TZDEFRULES);\r
+ }\r
+ return (errors == 0) ? EXIT_SUCCESS : EXIT_FAILURE;\r
+}\r
+\r
+static void\r
+dolink(fromfile, tofile)\r
+const char * const fromfile;\r
+const char * const tofile;\r
+{\r
+ register char * fromname;\r
+ register char * toname;\r
+\r
+ if (fromfile[0] == '/')\r
+ fromname = ecpyalloc(fromfile);\r
+ else {\r
+ fromname = ecpyalloc(directory);\r
+ fromname = ecatalloc(fromname, "/");\r
+ fromname = ecatalloc(fromname, fromfile);\r
+ }\r
+ if (tofile[0] == '/')\r
+ toname = ecpyalloc(tofile);\r
+ else {\r
+ toname = ecpyalloc(directory);\r
+ toname = ecatalloc(toname, "/");\r
+ toname = ecatalloc(toname, tofile);\r
+ }\r
+ /*\r
+ ** We get to be careful here since\r
+ ** there's a fair chance of root running us.\r
+ */\r
+ if (!itsdir(toname))\r
+ (void) remove(toname);\r
+ if (link(fromname, toname) != 0) {\r
+ int result;\r
+\r
+ if (mkdirs(toname) != 0)\r
+ (void) exit(EXIT_FAILURE);\r
+\r
+ result = link(fromname, toname);\r
+#if (HAVE_SYMLINK - 0)\r
+ if (result != 0 &&\r
+ access(fromname, F_OK) == 0 &&\r
+ !itsdir(fromname)) {\r
+ const char *s = tofile;\r
+ register char * symlinkcontents = NULL;\r
+ while ((s = strchr(s+1, '/')) != NULL)\r
+ symlinkcontents = ecatalloc(symlinkcontents, "../");\r
+ symlinkcontents = ecatalloc(symlinkcontents, fromfile);\r
+\r
+ result = symlink(symlinkcontents, toname);\r
+ if (result == 0)\r
+warning(_("hard link failed, symbolic link used"));\r
+ ifree(symlinkcontents);\r
+ }\r
+#endif\r
+ if (result != 0) {\r
+ const char *e = strerror(errno);\r
+\r
+ (void) fprintf(stderr,\r
+ _("%s: Can't link from %s to %s: %s\n"),\r
+ progname, fromname, toname, e);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ }\r
+ ifree(fromname);\r
+ ifree(toname);\r
+}\r
+\r
+#ifndef INT_MAX\r
+#define INT_MAX ((int) (((unsigned)~0)>>1))\r
+#endif /* !defined INT_MAX */\r
+\r
+#ifndef INT_MIN\r
+#define INT_MIN ((int) ~(((unsigned)~0)>>1))\r
+#endif /* !defined INT_MIN */\r
+\r
+/*\r
+** The tz file format currently allows at most 32-bit quantities.\r
+** This restriction should be removed before signed 32-bit values\r
+** wrap around in 2038, but unfortunately this will require a\r
+** change to the tz file format.\r
+*/\r
+\r
+#define MAX_BITS_IN_FILE 32\r
+#define TIME_T_BITS_IN_FILE ((TYPE_BIT(time_t) < MAX_BITS_IN_FILE) ? TYPE_BIT(time_t) : MAX_BITS_IN_FILE)\r
+\r
+static void\r
+setboundaries P((void))\r
+{\r
+ if (TYPE_SIGNED(time_t)) {\r
+ min_time = ~ (time_t) 0;\r
+ min_time <<= TIME_T_BITS_IN_FILE - 1;\r
+ max_time = ~ (time_t) 0 - min_time;\r
+ if (sflag)\r
+ min_time = 0;\r
+ } else {\r
+ min_time = 0;\r
+ max_time = 2 - sflag;\r
+ max_time <<= TIME_T_BITS_IN_FILE - 1;\r
+ --max_time;\r
+ }\r
+ min_year = TM_YEAR_BASE + gmtime(&min_time)->tm_year;\r
+ max_year = TM_YEAR_BASE + gmtime(&max_time)->tm_year;\r
+ min_year_representable = min_year;\r
+ max_year_representable = max_year;\r
+}\r
+\r
+static int\r
+itsdir(name)\r
+const char * const name;\r
+{\r
+ register char * myname;\r
+ register int accres;\r
+\r
+ myname = ecpyalloc(name);\r
+ myname = ecatalloc(myname, "/.");\r
+ accres = access(myname, F_OK);\r
+ ifree(myname);\r
+ return accres == 0;\r
+}\r
+\r
+/*\r
+** Associate sets of rules with zones.\r
+*/\r
+\r
+/*\r
+** Sort by rule name.\r
+*/\r
+\r
+static int\r
+rcomp(cp1, cp2)\r
+const void * cp1;\r
+const void * cp2;\r
+{\r
+ return strcmp(((const struct rule *) cp1)->r_name,\r
+ ((const struct rule *) cp2)->r_name);\r
+}\r
+\r
+static void\r
+associate P((void))\r
+{\r
+ register struct zone * zp;\r
+ register struct rule * rp;\r
+ register int base, out;\r
+ register int i, j;\r
+\r
+ if (nrules != 0) {\r
+ (void) qsort((void *) rules, (size_t) nrules,\r
+ (size_t) sizeof *rules, rcomp);\r
+ for (i = 0; i < nrules - 1; ++i) {\r
+ if (strcmp(rules[i].r_name,\r
+ rules[i + 1].r_name) != 0)\r
+ continue;\r
+ if (strcmp(rules[i].r_filename,\r
+ rules[i + 1].r_filename) == 0)\r
+ continue;\r
+ eat(rules[i].r_filename, rules[i].r_linenum);\r
+ warning(_("same rule name in multiple files"));\r
+ eat(rules[i + 1].r_filename, rules[i + 1].r_linenum);\r
+ warning(_("same rule name in multiple files"));\r
+ for (j = i + 2; j < nrules; ++j) {\r
+ if (strcmp(rules[i].r_name,\r
+ rules[j].r_name) != 0)\r
+ break;\r
+ if (strcmp(rules[i].r_filename,\r
+ rules[j].r_filename) == 0)\r
+ continue;\r
+ if (strcmp(rules[i + 1].r_filename,\r
+ rules[j].r_filename) == 0)\r
+ continue;\r
+ break;\r
+ }\r
+ i = j - 1;\r
+ }\r
+ }\r
+ for (i = 0; i < nzones; ++i) {\r
+ zp = &zones[i];\r
+ zp->z_rules = NULL;\r
+ zp->z_nrules = 0;\r
+ }\r
+ for (base = 0; base < nrules; base = out) {\r
+ rp = &rules[base];\r
+ for (out = base + 1; out < nrules; ++out)\r
+ if (strcmp(rp->r_name, rules[out].r_name) != 0)\r
+ break;\r
+ for (i = 0; i < nzones; ++i) {\r
+ zp = &zones[i];\r
+ if (strcmp(zp->z_rule, rp->r_name) != 0)\r
+ continue;\r
+ zp->z_rules = rp;\r
+ zp->z_nrules = out - base;\r
+ }\r
+ }\r
+ for (i = 0; i < nzones; ++i) {\r
+ zp = &zones[i];\r
+ if (zp->z_nrules == 0) {\r
+ /*\r
+ ** Maybe we have a local standard time offset.\r
+ */\r
+ eat(zp->z_filename, zp->z_linenum);\r
+ zp->z_stdoff = gethms(zp->z_rule, _("unruly zone"),\r
+ TRUE);\r
+ /*\r
+ ** Note, though, that if there's no rule,\r
+ ** a '%s' in the format is a bad thing.\r
+ */\r
+ if (strchr(zp->z_format, '%') != 0)\r
+ error(_("%s in ruleless zone"));\r
+ }\r
+ }\r
+ if (errors)\r
+ (void) exit(EXIT_FAILURE);\r
+}\r
+\r
+static void\r
+infile(name)\r
+const char * name;\r
+{\r
+ register FILE * fp;\r
+ register char ** fields;\r
+ register char * cp;\r
+ register const struct lookup * lp;\r
+ register int nfields;\r
+ register int wantcont;\r
+ register int num;\r
+ char buf[BUFSIZ];\r
+\r
+ if (strcmp(name, "-") == 0) {\r
+ name = _("standard input");\r
+ fp = stdin;\r
+ } else if ((fp = fopen(name, "r")) == NULL) {\r
+ const char *e = strerror(errno);\r
+\r
+ (void) fprintf(stderr, _("%s: Can't open %s: %s\n"),\r
+ progname, name, e);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ wantcont = FALSE;\r
+ for (num = 1; ; ++num) {\r
+ eat(name, num);\r
+ if (fgets(buf, (int) sizeof buf, fp) != buf)\r
+ break;\r
+ cp = strchr(buf, '\n');\r
+ if (cp == NULL) {\r
+ error(_("line too long"));\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ *cp = '\0';\r
+ fields = getfields(buf);\r
+ nfields = 0;\r
+ while (fields[nfields] != NULL) {\r
+ static char nada;\r
+\r
+ if (strcmp(fields[nfields], "-") == 0)\r
+ fields[nfields] = &nada;\r
+ ++nfields;\r
+ }\r
+ if (nfields == 0) {\r
+ /* nothing to do */\r
+ } else if (wantcont) {\r
+ wantcont = inzcont(fields, nfields);\r
+ } else {\r
+ lp = byword(fields[0], line_codes);\r
+ if (lp == NULL)\r
+ error(_("input line of unknown type"));\r
+ else switch ((int) (lp->l_value)) {\r
+ case LC_RULE:\r
+ inrule(fields, nfields);\r
+ wantcont = FALSE;\r
+ break;\r
+ case LC_ZONE:\r
+ wantcont = inzone(fields, nfields);\r
+ break;\r
+ case LC_LINK:\r
+ inlink(fields, nfields);\r
+ wantcont = FALSE;\r
+ break;\r
+ case LC_LEAP:\r
+ if (name != leapsec)\r
+ (void) fprintf(stderr,\r
+_("%s: Leap line in non leap seconds file %s\n"),\r
+ progname, name);\r
+ else inleap(fields, nfields);\r
+ wantcont = FALSE;\r
+ break;\r
+ default: /* "cannot happen" */\r
+ (void) fprintf(stderr,\r
+_("%s: panic: Invalid l_value %d\n"),\r
+ progname, lp->l_value);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ }\r
+ ifree((char *) fields);\r
+ }\r
+ if (ferror(fp)) {\r
+ (void) fprintf(stderr, _("%s: Error reading %s\n"),\r
+ progname, filename);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ if (fp != stdin && fclose(fp)) {\r
+ const char *e = strerror(errno);\r
+\r
+ (void) fprintf(stderr, _("%s: Error closing %s: %s\n"),\r
+ progname, filename, e);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ if (wantcont)\r
+ error(_("expected continuation line not found"));\r
+}\r
+\r
+/*\r
+** Convert a string of one of the forms\r
+** h -h hh:mm -hh:mm hh:mm:ss -hh:mm:ss\r
+** into a number of seconds.\r
+** A null string maps to zero.\r
+** Call error with errstring and return zero on errors.\r
+*/\r
+\r
+static long\r
+gethms(string, errstring, signable)\r
+const char * string;\r
+const char * const errstring;\r
+const int signable;\r
+{\r
+ int hh, mm, ss, sign;\r
+\r
+ if (string == NULL || *string == '\0')\r
+ return 0;\r
+ if (!signable)\r
+ sign = 1;\r
+ else if (*string == '-') {\r
+ sign = -1;\r
+ ++string;\r
+ } else sign = 1;\r
+ if (sscanf(string, scheck(string, "%d"), &hh) == 1)\r
+ mm = ss = 0;\r
+ else if (sscanf(string, scheck(string, "%d:%d"), &hh, &mm) == 2)\r
+ ss = 0;\r
+ else if (sscanf(string, scheck(string, "%d:%d:%d"),\r
+ &hh, &mm, &ss) != 3) {\r
+ error(errstring);\r
+ return 0;\r
+ }\r
+ if ((hh < 0 || hh >= HOURSPERDAY ||\r
+ mm < 0 || mm >= MINSPERHOUR ||\r
+ ss < 0 || ss > SECSPERMIN) &&\r
+ !(hh == HOURSPERDAY && mm == 0 && ss == 0)) {\r
+ error(errstring);\r
+ return 0;\r
+ }\r
+ if (noise && hh == HOURSPERDAY)\r
+ warning(_("24:00 not handled by pre-1998 versions of zic"));\r
+ return eitol(sign) *\r
+ (eitol(hh * MINSPERHOUR + mm) *\r
+ eitol(SECSPERMIN) + eitol(ss));\r
+}\r
+\r
+static void\r
+inrule(fields, nfields)\r
+register char ** const fields;\r
+const int nfields;\r
+{\r
+ static struct rule r;\r
+\r
+ if (nfields != RULE_FIELDS) {\r
+ error(_("wrong number of fields on Rule line"));\r
+ return;\r
+ }\r
+ if (*fields[RF_NAME] == '\0') {\r
+ error(_("nameless rule"));\r
+ return;\r
+ }\r
+ r.r_filename = filename;\r
+ r.r_linenum = linenum;\r
+ r.r_stdoff = gethms(fields[RF_STDOFF], _("invalid saved time"), TRUE);\r
+ rulesub(&r, fields[RF_LOYEAR], fields[RF_HIYEAR], fields[RF_COMMAND],\r
+ fields[RF_MONTH], fields[RF_DAY], fields[RF_TOD]);\r
+ r.r_name = ecpyalloc(fields[RF_NAME]);\r
+ r.r_abbrvar = ecpyalloc(fields[RF_ABBRVAR]);\r
+ rules = (struct rule *) (void *) erealloc((char *) rules,\r
+ (int) ((nrules + 1) * sizeof *rules));\r
+ rules[nrules++] = r;\r
+}\r
+\r
+static int\r
+inzone(fields, nfields)\r
+register char ** const fields;\r
+const int nfields;\r
+{\r
+ register int i;\r
+ static char * buf;\r
+\r
+ if (nfields < ZONE_MINFIELDS || nfields > ZONE_MAXFIELDS) {\r
+ error(_("wrong number of fields on Zone line"));\r
+ return FALSE;\r
+ }\r
+ if (strcmp(fields[ZF_NAME], TZDEFAULT) == 0 && lcltime != NULL) {\r
+ buf = erealloc(buf, (int) (132 + strlen(TZDEFAULT)));\r
+ (void) sprintf(buf,\r
+_("\"Zone %s\" line and -l option are mutually exclusive"),\r
+ TZDEFAULT);\r
+ error(buf);\r
+ return FALSE;\r
+ }\r
+ if (strcmp(fields[ZF_NAME], TZDEFRULES) == 0 && psxrules != NULL) {\r
+ buf = erealloc(buf, (int) (132 + strlen(TZDEFRULES)));\r
+ (void) sprintf(buf,\r
+_("\"Zone %s\" line and -p option are mutually exclusive"),\r
+ TZDEFRULES);\r
+ error(buf);\r
+ return FALSE;\r
+ }\r
+ for (i = 0; i < nzones; ++i)\r
+ if (zones[i].z_name != NULL &&\r
+ strcmp(zones[i].z_name, fields[ZF_NAME]) == 0) {\r
+ buf = erealloc(buf, (int) (132 +\r
+ strlen(fields[ZF_NAME]) +\r
+ strlen(zones[i].z_filename)));\r
+ (void) sprintf(buf,\r
+_("duplicate zone name %s (file \"%s\", line %d)"),\r
+ fields[ZF_NAME],\r
+ zones[i].z_filename,\r
+ zones[i].z_linenum);\r
+ error(buf);\r
+ return FALSE;\r
+ }\r
+ return inzsub(fields, nfields, FALSE);\r
+}\r
+\r
+static int\r
+inzcont(fields, nfields)\r
+register char ** const fields;\r
+const int nfields;\r
+{\r
+ if (nfields < ZONEC_MINFIELDS || nfields > ZONEC_MAXFIELDS) {\r
+ error(_("wrong number of fields on Zone continuation line"));\r
+ return FALSE;\r
+ }\r
+ return inzsub(fields, nfields, TRUE);\r
+}\r
+\r
+static int\r
+inzsub(fields, nfields, iscont)\r
+register char ** const fields;\r
+const int nfields;\r
+const int iscont;\r
+{\r
+ register char * cp;\r
+ static struct zone z;\r
+ register int i_gmtoff, i_rule, i_format;\r
+ register int i_untilyear, i_untilmonth;\r
+ register int i_untilday, i_untiltime;\r
+ register int hasuntil;\r
+\r
+ if (iscont) {\r
+ i_gmtoff = ZFC_GMTOFF;\r
+ i_rule = ZFC_RULE;\r
+ i_format = ZFC_FORMAT;\r
+ i_untilyear = ZFC_TILYEAR;\r
+ i_untilmonth = ZFC_TILMONTH;\r
+ i_untilday = ZFC_TILDAY;\r
+ i_untiltime = ZFC_TILTIME;\r
+ z.z_name = NULL;\r
+ } else {\r
+ i_gmtoff = ZF_GMTOFF;\r
+ i_rule = ZF_RULE;\r
+ i_format = ZF_FORMAT;\r
+ i_untilyear = ZF_TILYEAR;\r
+ i_untilmonth = ZF_TILMONTH;\r
+ i_untilday = ZF_TILDAY;\r
+ i_untiltime = ZF_TILTIME;\r
+ z.z_name = ecpyalloc(fields[ZF_NAME]);\r
+ }\r
+ z.z_filename = filename;\r
+ z.z_linenum = linenum;\r
+ z.z_gmtoff = gethms(fields[i_gmtoff], _("invalid UTC offset"), TRUE);\r
+ if ((cp = strchr(fields[i_format], '%')) != 0) {\r
+ if (*++cp != 's' || strchr(cp, '%') != 0) {\r
+ error(_("invalid abbreviation format"));\r
+ return FALSE;\r
+ }\r
+ }\r
+ z.z_rule = ecpyalloc(fields[i_rule]);\r
+ z.z_format = ecpyalloc(fields[i_format]);\r
+ hasuntil = nfields > i_untilyear;\r
+ if (hasuntil) {\r
+ z.z_untilrule.r_filename = filename;\r
+ z.z_untilrule.r_linenum = linenum;\r
+ rulesub(&z.z_untilrule,\r
+ fields[i_untilyear],\r
+ "only",\r
+ "",\r
+ (nfields > i_untilmonth) ?\r
+ fields[i_untilmonth] : "Jan",\r
+ (nfields > i_untilday) ? fields[i_untilday] : "1",\r
+ (nfields > i_untiltime) ? fields[i_untiltime] : "0");\r
+ z.z_untiltime = rpytime(&z.z_untilrule,\r
+ z.z_untilrule.r_loyear);\r
+ if (iscont && nzones > 0 &&\r
+ z.z_untiltime > min_time &&\r
+ z.z_untiltime < max_time &&\r
+ zones[nzones - 1].z_untiltime > min_time &&\r
+ zones[nzones - 1].z_untiltime < max_time &&\r
+ zones[nzones - 1].z_untiltime >= z.z_untiltime) {\r
+ error(_("Zone continuation line end time is not after end time of previous line"));\r
+ return FALSE;\r
+ }\r
+ }\r
+ zones = (struct zone *) (void *) erealloc((char *) zones,\r
+ (int) ((nzones + 1) * sizeof *zones));\r
+ zones[nzones++] = z;\r
+ /*\r
+ ** If there was an UNTIL field on this line,\r
+ ** there's more information about the zone on the next line.\r
+ */\r
+ return hasuntil;\r
+}\r
+\r
+static void\r
+inleap(fields, nfields)\r
+register char ** const fields;\r
+const int nfields;\r
+{\r
+ register const char * cp;\r
+ register const struct lookup * lp;\r
+ register int i, j;\r
+ int year, month, day;\r
+ long dayoff, tod;\r
+ time_t t;\r
+\r
+ if (nfields != LEAP_FIELDS) {\r
+ error(_("wrong number of fields on Leap line"));\r
+ return;\r
+ }\r
+ dayoff = 0;\r
+ cp = fields[LP_YEAR];\r
+ if (sscanf(cp, scheck(cp, "%d"), &year) != 1) {\r
+ /*\r
+ * Leapin' Lizards!\r
+ */\r
+ error(_("invalid leaping year"));\r
+ return;\r
+ }\r
+ j = EPOCH_YEAR;\r
+ while (j != year) {\r
+ if (year > j) {\r
+ i = len_years[isleap(j)];\r
+ ++j;\r
+ } else {\r
+ --j;\r
+ i = -len_years[isleap(j)];\r
+ }\r
+ dayoff = oadd(dayoff, eitol(i));\r
+ }\r
+ if ((lp = byword(fields[LP_MONTH], mon_names)) == NULL) {\r
+ error(_("invalid month name"));\r
+ return;\r
+ }\r
+ month = lp->l_value;\r
+ j = TM_JANUARY;\r
+ while (j != month) {\r
+ i = len_months[isleap(year)][j];\r
+ dayoff = oadd(dayoff, eitol(i));\r
+ ++j;\r
+ }\r
+ cp = fields[LP_DAY];\r
+ if (sscanf(cp, scheck(cp, "%d"), &day) != 1 ||\r
+ day <= 0 || day > len_months[isleap(year)][month]) {\r
+ error(_("invalid day of month"));\r
+ return;\r
+ }\r
+ dayoff = oadd(dayoff, eitol(day - 1));\r
+ if (dayoff < 0 && !TYPE_SIGNED(time_t)) {\r
+ error(_("time before zero"));\r
+ return;\r
+ }\r
+ if (dayoff < min_time / SECSPERDAY) {\r
+ error(_("time too small"));\r
+ return;\r
+ }\r
+ if (dayoff > max_time / SECSPERDAY) {\r
+ error(_("time too large"));\r
+ return;\r
+ }\r
+ t = (time_t) dayoff * SECSPERDAY;\r
+ tod = gethms(fields[LP_TIME], _("invalid time of day"), FALSE);\r
+ cp = fields[LP_CORR];\r
+ {\r
+ register int positive;\r
+ int count;\r
+\r
+ if (strcmp(cp, "") == 0) { /* infile() turns "-" into "" */\r
+ positive = FALSE;\r
+ count = 1;\r
+ } else if (strcmp(cp, "--") == 0) {\r
+ positive = FALSE;\r
+ count = 2;\r
+ } else if (strcmp(cp, "+") == 0) {\r
+ positive = TRUE;\r
+ count = 1;\r
+ } else if (strcmp(cp, "++") == 0) {\r
+ positive = TRUE;\r
+ count = 2;\r
+ } else {\r
+ error(_("illegal CORRECTION field on Leap line"));\r
+ return;\r
+ }\r
+ if ((lp = byword(fields[LP_ROLL], leap_types)) == NULL) {\r
+ error(_("illegal Rolling/Stationary field on Leap line"));\r
+ return;\r
+ }\r
+ leapadd(tadd(t, tod), positive, lp->l_value, count);\r
+ }\r
+}\r
+\r
+static void\r
+inlink(fields, nfields)\r
+register char ** const fields;\r
+const int nfields;\r
+{\r
+ struct link l;\r
+\r
+ if (nfields != LINK_FIELDS) {\r
+ error(_("wrong number of fields on Link line"));\r
+ return;\r
+ }\r
+ if (*fields[LF_FROM] == '\0') {\r
+ error(_("blank FROM field on Link line"));\r
+ return;\r
+ }\r
+ if (*fields[LF_TO] == '\0') {\r
+ error(_("blank TO field on Link line"));\r
+ return;\r
+ }\r
+ l.l_filename = filename;\r
+ l.l_linenum = linenum;\r
+ l.l_from = ecpyalloc(fields[LF_FROM]);\r
+ l.l_to = ecpyalloc(fields[LF_TO]);\r
+ links = (struct link *) (void *) erealloc((char *) links,\r
+ (int) ((nlinks + 1) * sizeof *links));\r
+ links[nlinks++] = l;\r
+}\r
+\r
+static void\r
+rulesub(rp, loyearp, hiyearp, typep, monthp, dayp, timep)\r
+register struct rule * const rp;\r
+const char * const loyearp;\r
+const char * const hiyearp;\r
+const char * const typep;\r
+const char * const monthp;\r
+const char * const dayp;\r
+const char * const timep;\r
+{\r
+ register const struct lookup * lp;\r
+ register const char * cp;\r
+ register char * dp;\r
+ register char * ep;\r
+\r
+ if ((lp = byword(monthp, mon_names)) == NULL) {\r
+ error(_("invalid month name"));\r
+ return;\r
+ }\r
+ rp->r_month = lp->l_value;\r
+ rp->r_todisstd = FALSE;\r
+ rp->r_todisgmt = FALSE;\r
+ dp = ecpyalloc(timep);\r
+ if (*dp != '\0') {\r
+ ep = dp + strlen(dp) - 1;\r
+ switch (lowerit(*ep)) {\r
+ case 's': /* Standard */\r
+ rp->r_todisstd = TRUE;\r
+ rp->r_todisgmt = FALSE;\r
+ *ep = '\0';\r
+ break;\r
+ case 'w': /* Wall */\r
+ rp->r_todisstd = FALSE;\r
+ rp->r_todisgmt = FALSE;\r
+ *ep = '\0';\r
+ break;\r
+ case 'g': /* Greenwich */\r
+ case 'u': /* Universal */\r
+ case 'z': /* Zulu */\r
+ rp->r_todisstd = TRUE;\r
+ rp->r_todisgmt = TRUE;\r
+ *ep = '\0';\r
+ break;\r
+ }\r
+ }\r
+ rp->r_tod = gethms(dp, _("invalid time of day"), FALSE);\r
+ ifree(dp);\r
+ /*\r
+ ** Year work.\r
+ */\r
+ cp = loyearp;\r
+ lp = byword(cp, begin_years);\r
+ if (lp != NULL) switch ((int) lp->l_value) {\r
+ case YR_MINIMUM:\r
+ rp->r_loyear = INT_MIN;\r
+ break;\r
+ case YR_MAXIMUM:\r
+ rp->r_loyear = INT_MAX;\r
+ break;\r
+ default: /* "cannot happen" */\r
+ (void) fprintf(stderr,\r
+ _("%s: panic: Invalid l_value %d\n"),\r
+ progname, lp->l_value);\r
+ (void) exit(EXIT_FAILURE);\r
+ } else if (sscanf(cp, scheck(cp, "%d"), &rp->r_loyear) != 1) {\r
+ error(_("invalid starting year"));\r
+ return;\r
+ } else if (noise) {\r
+ if (rp->r_loyear < min_year_representable)\r
+ warning(_("starting year too low to be represented"));\r
+ else if (rp->r_loyear > max_year_representable)\r
+ warning(_("starting year too high to be represented"));\r
+ }\r
+ cp = hiyearp;\r
+ if ((lp = byword(cp, end_years)) != NULL) switch ((int) lp->l_value) {\r
+ case YR_MINIMUM:\r
+ rp->r_hiyear = INT_MIN;\r
+ break;\r
+ case YR_MAXIMUM:\r
+ rp->r_hiyear = INT_MAX;\r
+ break;\r
+ case YR_ONLY:\r
+ rp->r_hiyear = rp->r_loyear;\r
+ break;\r
+ default: /* "cannot happen" */\r
+ (void) fprintf(stderr,\r
+ _("%s: panic: Invalid l_value %d\n"),\r
+ progname, lp->l_value);\r
+ (void) exit(EXIT_FAILURE);\r
+ } else if (sscanf(cp, scheck(cp, "%d"), &rp->r_hiyear) != 1) {\r
+ error(_("invalid ending year"));\r
+ return;\r
+ } else if (noise) {\r
+ if (rp->r_loyear < min_year_representable)\r
+ warning(_("ending year too low to be represented"));\r
+ else if (rp->r_loyear > max_year_representable)\r
+ warning(_("ending year too high to be represented"));\r
+ }\r
+ if (rp->r_loyear > rp->r_hiyear) {\r
+ error(_("starting year greater than ending year"));\r
+ return;\r
+ }\r
+ if (*typep == '\0')\r
+ rp->r_yrtype = NULL;\r
+ else {\r
+ if (rp->r_loyear == rp->r_hiyear) {\r
+ error(_("typed single year"));\r
+ return;\r
+ }\r
+ rp->r_yrtype = ecpyalloc(typep);\r
+ }\r
+ if (rp->r_loyear < min_year && rp->r_loyear > 0)\r
+ min_year = rp->r_loyear;\r
+ /*\r
+ ** Day work.\r
+ ** Accept things such as:\r
+ ** 1\r
+ ** last-Sunday\r
+ ** Sun<=20\r
+ ** Sun>=7\r
+ */\r
+ dp = ecpyalloc(dayp);\r
+ if ((lp = byword(dp, lasts)) != NULL) {\r
+ rp->r_dycode = DC_DOWLEQ;\r
+ rp->r_wday = lp->l_value;\r
+ rp->r_dayofmonth = len_months[1][rp->r_month];\r
+ } else {\r
+ if ((ep = strchr(dp, '<')) != 0)\r
+ rp->r_dycode = DC_DOWLEQ;\r
+ else if ((ep = strchr(dp, '>')) != 0)\r
+ rp->r_dycode = DC_DOWGEQ;\r
+ else {\r
+ ep = dp;\r
+ rp->r_dycode = DC_DOM;\r
+ }\r
+ if (rp->r_dycode != DC_DOM) {\r
+ *ep++ = 0;\r
+ if (*ep++ != '=') {\r
+ error(_("invalid day of month"));\r
+ ifree(dp);\r
+ return;\r
+ }\r
+ if ((lp = byword(dp, wday_names)) == NULL) {\r
+ error(_("invalid weekday name"));\r
+ ifree(dp);\r
+ return;\r
+ }\r
+ rp->r_wday = lp->l_value;\r
+ }\r
+ if (sscanf(ep, scheck(ep, "%d"), &rp->r_dayofmonth) != 1 ||\r
+ rp->r_dayofmonth <= 0 ||\r
+ (rp->r_dayofmonth > len_months[1][rp->r_month])) {\r
+ error(_("invalid day of month"));\r
+ ifree(dp);\r
+ return;\r
+ }\r
+ }\r
+ ifree(dp);\r
+}\r
+\r
+static void\r
+convert(val, buf)\r
+const long val;\r
+char * const buf;\r
+{\r
+ register int i;\r
+ register long shift;\r
+\r
+ for (i = 0, shift = 24; i < 4; ++i, shift -= 8)\r
+ buf[i] = val >> shift;\r
+}\r
+\r
+static void\r
+puttzcode(val, fp)\r
+const long val;\r
+FILE * const fp;\r
+{\r
+ char buf[4];\r
+\r
+ convert(val, buf);\r
+ (void) fwrite((void *) buf, (size_t) sizeof buf, (size_t) 1, fp);\r
+}\r
+\r
+static int\r
+atcomp(avp, bvp)\r
+void * avp;\r
+void * bvp;\r
+{\r
+ if (((struct attype *) avp)->at < ((struct attype *) bvp)->at)\r
+ return -1;\r
+ else if (((struct attype *) avp)->at > ((struct attype *) bvp)->at)\r
+ return 1;\r
+ else return 0;\r
+}\r
+\r
+static void\r
+writezone(name)\r
+const char * const name;\r
+{\r
+ register FILE * fp;\r
+ register int i, j;\r
+ static char * fullname;\r
+ static struct tzhead tzh;\r
+ time_t ats[TZ_MAX_TIMES];\r
+ unsigned char types[TZ_MAX_TIMES];\r
+\r
+ /*\r
+ ** Sort.\r
+ */\r
+ if (timecnt > 1)\r
+ (void) qsort((void *) attypes, (size_t) timecnt,\r
+ (size_t) sizeof *attypes, atcomp);\r
+ /*\r
+ ** Optimize.\r
+ */\r
+ {\r
+ int fromi;\r
+ int toi;\r
+\r
+ toi = 0;\r
+ fromi = 0;\r
+ while (fromi < timecnt && attypes[fromi].at < min_time)\r
+ ++fromi;\r
+ if (isdsts[0] == 0)\r
+ while (fromi < timecnt && attypes[fromi].type == 0)\r
+ ++fromi; /* handled by default rule */\r
+ for ( ; fromi < timecnt; ++fromi) {\r
+ if (toi != 0\r
+ && ((attypes[fromi].at\r
+ + gmtoffs[attypes[toi - 1].type])\r
+ <= (attypes[toi - 1].at\r
+ + gmtoffs[toi == 1 ? 0\r
+ : attypes[toi - 2].type]))) {\r
+ attypes[toi - 1].type = attypes[fromi].type;\r
+ continue;\r
+ }\r
+ if (toi == 0 ||\r
+ attypes[toi - 1].type != attypes[fromi].type)\r
+ attypes[toi++] = attypes[fromi];\r
+ }\r
+ timecnt = toi;\r
+ }\r
+ /*\r
+ ** Transfer.\r
+ */\r
+ for (i = 0; i < timecnt; ++i) {\r
+ ats[i] = attypes[i].at;\r
+ types[i] = attypes[i].type;\r
+ }\r
+ fullname = erealloc(fullname,\r
+ (int) (strlen(directory) + 1 + strlen(name) + 1));\r
+ (void) sprintf(fullname, "%s/%s", directory, name);\r
+ /*\r
+ ** Remove old file, if any, to snap links.\r
+ */\r
+ if (!itsdir(fullname) && remove(fullname) != 0 && errno != ENOENT) {\r
+ const char *e = strerror(errno);\r
+\r
+ (void) fprintf(stderr, _("%s: Can't remove %s: %s\n"),\r
+ progname, fullname, e);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ if ((fp = fopen(fullname, "wb")) == NULL) {\r
+ if (mkdirs(fullname) != 0)\r
+ (void) exit(EXIT_FAILURE);\r
+ if ((fp = fopen(fullname, "wb")) == NULL) {\r
+ const char *e = strerror(errno);\r
+\r
+ (void) fprintf(stderr, _("%s: Can't create %s: %s\n"),\r
+ progname, fullname, e);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ }\r
+ convert(eitol(typecnt), tzh.tzh_ttisgmtcnt);\r
+ convert(eitol(typecnt), tzh.tzh_ttisstdcnt);\r
+ convert(eitol(leapcnt), tzh.tzh_leapcnt);\r
+ convert(eitol(timecnt), tzh.tzh_timecnt);\r
+ convert(eitol(typecnt), tzh.tzh_typecnt);\r
+ convert(eitol(charcnt), tzh.tzh_charcnt);\r
+ (void) strncpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic);\r
+#define DO(field) (void) fwrite((void *) tzh.field, (size_t) sizeof tzh.field, (size_t) 1, fp)\r
+ DO(tzh_magic);\r
+ DO(tzh_reserved);\r
+ DO(tzh_ttisgmtcnt);\r
+ DO(tzh_ttisstdcnt);\r
+ DO(tzh_leapcnt);\r
+ DO(tzh_timecnt);\r
+ DO(tzh_typecnt);\r
+ DO(tzh_charcnt);\r
+#undef DO\r
+ for (i = 0; i < timecnt; ++i) {\r
+ j = leapcnt;\r
+ while (--j >= 0)\r
+ if (ats[i] >= trans[j]) {\r
+ ats[i] = tadd(ats[i], corr[j]);\r
+ break;\r
+ }\r
+ puttzcode((long) ats[i], fp);\r
+ }\r
+ if (timecnt > 0)\r
+ (void) fwrite((void *) types, (size_t) sizeof types[0],\r
+ (size_t) timecnt, fp);\r
+ for (i = 0; i < typecnt; ++i) {\r
+ puttzcode((long) gmtoffs[i], fp);\r
+ (void) putc(isdsts[i], fp);\r
+ (void) putc(abbrinds[i], fp);\r
+ }\r
+ if (charcnt != 0)\r
+ (void) fwrite((void *) chars, (size_t) sizeof chars[0],\r
+ (size_t) charcnt, fp);\r
+ for (i = 0; i < leapcnt; ++i) {\r
+ if (roll[i]) {\r
+ if (timecnt == 0 || trans[i] < ats[0]) {\r
+ j = 0;\r
+ while (isdsts[j])\r
+ if (++j >= typecnt) {\r
+ j = 0;\r
+ break;\r
+ }\r
+ } else {\r
+ j = 1;\r
+ while (j < timecnt && trans[i] >= ats[j])\r
+ ++j;\r
+ j = types[j - 1];\r
+ }\r
+ puttzcode((long) tadd(trans[i], -gmtoffs[j]), fp);\r
+ } else puttzcode((long) trans[i], fp);\r
+ puttzcode((long) corr[i], fp);\r
+ }\r
+ for (i = 0; i < typecnt; ++i)\r
+ (void) putc(ttisstds[i], fp);\r
+ for (i = 0; i < typecnt; ++i)\r
+ (void) putc(ttisgmts[i], fp);\r
+ if (ferror(fp) || fclose(fp)) {\r
+ (void) fprintf(stderr, _("%s: Error writing %s\n"),\r
+ progname, fullname);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+}\r
+\r
+static void\r
+doabbr(abbr, format, letters, isdst)\r
+char * const abbr;\r
+const char * const format;\r
+const char * const letters;\r
+const int isdst;\r
+{\r
+ if (strchr(format, '/') == NULL) {\r
+ if (letters == NULL)\r
+ (void) strcpy(abbr, format);\r
+ else (void) sprintf(abbr, format, letters);\r
+ } else if (isdst)\r
+ (void) strcpy(abbr, strchr(format, '/') + 1);\r
+ else {\r
+ (void) strcpy(abbr, format);\r
+ *strchr(abbr, '/') = '\0';\r
+ }\r
+}\r
+\r
+static void\r
+outzone(zpfirst, zonecount)\r
+const struct zone * const zpfirst;\r
+const int zonecount;\r
+{\r
+ register const struct zone * zp;\r
+ register struct rule * rp;\r
+ register int i, j;\r
+ register int usestart, useuntil;\r
+ register time_t starttime, untiltime;\r
+ register long gmtoff;\r
+ register long stdoff;\r
+ register int year;\r
+ register long startoff;\r
+ register int startttisstd;\r
+ register int startttisgmt;\r
+ register int type;\r
+ char startbuf[BUFSIZ];\r
+\r
+ INITIALIZE(untiltime);\r
+ INITIALIZE(starttime);\r
+ /*\r
+ ** Now. . .finally. . .generate some useful data!\r
+ */\r
+ timecnt = 0;\r
+ typecnt = 0;\r
+ charcnt = 0;\r
+ /*\r
+ ** for noting the need to unconditionally initialize startttisstd.\r
+ */\r
+ startttisstd = FALSE;\r
+ startttisgmt = FALSE;\r
+ for (i = 0; i < zonecount; ++i) {\r
+ /*\r
+ ** A guess that may well be corrected later.\r
+ */\r
+ stdoff = 0;\r
+ zp = &zpfirst[i];\r
+ usestart = i > 0 && (zp - 1)->z_untiltime > min_time;\r
+ useuntil = i < (zonecount - 1);\r
+ if (useuntil && zp->z_untiltime <= min_time)\r
+ continue;\r
+ gmtoff = zp->z_gmtoff;\r
+ eat(zp->z_filename, zp->z_linenum);\r
+ *startbuf = '\0';\r
+ startoff = zp->z_gmtoff;\r
+ if (zp->z_nrules == 0) {\r
+ stdoff = zp->z_stdoff;\r
+ doabbr(startbuf, zp->z_format,\r
+ (char *) NULL, stdoff != 0);\r
+ type = addtype(oadd(zp->z_gmtoff, stdoff),\r
+ startbuf, stdoff != 0, startttisstd,\r
+ startttisgmt);\r
+ if (usestart) {\r
+ addtt(starttime, type);\r
+ usestart = FALSE;\r
+ } else if (stdoff != 0)\r
+ addtt(min_time, type);\r
+ } else for (year = min_year; year <= max_year; ++year) {\r
+ if (useuntil && year > zp->z_untilrule.r_hiyear)\r
+ break;\r
+ /*\r
+ ** Mark which rules to do in the current year.\r
+ ** For those to do, calculate rpytime(rp, year);\r
+ */\r
+ for (j = 0; j < zp->z_nrules; ++j) {\r
+ rp = &zp->z_rules[j];\r
+ eats(zp->z_filename, zp->z_linenum,\r
+ rp->r_filename, rp->r_linenum);\r
+ rp->r_todo = year >= rp->r_loyear &&\r
+ year <= rp->r_hiyear &&\r
+ yearistype(year, rp->r_yrtype);\r
+ if (rp->r_todo)\r
+ rp->r_temp = rpytime(rp, year);\r
+ }\r
+ for ( ; ; ) {\r
+ register int k;\r
+ register time_t jtime, ktime;\r
+ register long offset;\r
+ char buf[BUFSIZ];\r
+\r
+ INITIALIZE(ktime);\r
+ if (useuntil) {\r
+ /*\r
+ ** Turn untiltime into UTC\r
+ ** assuming the current gmtoff and\r
+ ** stdoff values.\r
+ */\r
+ untiltime = zp->z_untiltime;\r
+ if (!zp->z_untilrule.r_todisgmt)\r
+ untiltime = tadd(untiltime,\r
+ -gmtoff);\r
+ if (!zp->z_untilrule.r_todisstd)\r
+ untiltime = tadd(untiltime,\r
+ -stdoff);\r
+ }\r
+ /*\r
+ ** Find the rule (of those to do, if any)\r
+ ** that takes effect earliest in the year.\r
+ */\r
+ k = -1;\r
+ for (j = 0; j < zp->z_nrules; ++j) {\r
+ rp = &zp->z_rules[j];\r
+ if (!rp->r_todo)\r
+ continue;\r
+ eats(zp->z_filename, zp->z_linenum,\r
+ rp->r_filename, rp->r_linenum);\r
+ offset = rp->r_todisgmt ? 0 : gmtoff;\r
+ if (!rp->r_todisstd)\r
+ offset = oadd(offset, stdoff);\r
+ jtime = rp->r_temp;\r
+ if (jtime == min_time ||\r
+ jtime == max_time)\r
+ continue;\r
+ jtime = tadd(jtime, -offset);\r
+ if (k < 0 || jtime < ktime) {\r
+ k = j;\r
+ ktime = jtime;\r
+ }\r
+ }\r
+ if (k < 0)\r
+ break; /* go on to next year */\r
+ rp = &zp->z_rules[k];\r
+ rp->r_todo = FALSE;\r
+ if (useuntil && ktime >= untiltime)\r
+ break;\r
+ stdoff = rp->r_stdoff;\r
+ if (usestart && ktime == starttime)\r
+ usestart = FALSE;\r
+ if (usestart) {\r
+ if (ktime < starttime) {\r
+ startoff = oadd(zp->z_gmtoff,\r
+ stdoff);\r
+ doabbr(startbuf, zp->z_format,\r
+ rp->r_abbrvar,\r
+ rp->r_stdoff != 0);\r
+ continue;\r
+ }\r
+ if (*startbuf == '\0' &&\r
+ startoff == oadd(zp->z_gmtoff,\r
+ stdoff)) {\r
+ doabbr(startbuf, zp->z_format,\r
+ rp->r_abbrvar,\r
+ rp->r_stdoff != 0);\r
+ }\r
+ }\r
+ eats(zp->z_filename, zp->z_linenum,\r
+ rp->r_filename, rp->r_linenum);\r
+ doabbr(buf, zp->z_format, rp->r_abbrvar,\r
+ rp->r_stdoff != 0);\r
+ offset = oadd(zp->z_gmtoff, rp->r_stdoff);\r
+ type = addtype(offset, buf, rp->r_stdoff != 0,\r
+ rp->r_todisstd, rp->r_todisgmt);\r
+ addtt(ktime, type);\r
+ }\r
+ }\r
+ if (usestart) {\r
+ if (*startbuf == '\0' &&\r
+ zp->z_format != NULL &&\r
+ strchr(zp->z_format, '%') == NULL &&\r
+ strchr(zp->z_format, '/') == NULL)\r
+ (void) strcpy(startbuf, zp->z_format);\r
+ eat(zp->z_filename, zp->z_linenum);\r
+ if (*startbuf == '\0')\r
+error(_("can't determine time zone abbreviation to use just after until time"));\r
+ else addtt(starttime,\r
+ addtype(startoff, startbuf,\r
+ startoff != zp->z_gmtoff,\r
+ startttisstd,\r
+ startttisgmt));\r
+ }\r
+ /*\r
+ ** Now we may get to set starttime for the next zone line.\r
+ */\r
+ if (useuntil) {\r
+ startttisstd = zp->z_untilrule.r_todisstd;\r
+ startttisgmt = zp->z_untilrule.r_todisgmt;\r
+ starttime = zp->z_untiltime;\r
+ if (!startttisstd)\r
+ starttime = tadd(starttime, -stdoff);\r
+ if (!startttisgmt)\r
+ starttime = tadd(starttime, -gmtoff);\r
+ }\r
+ }\r
+ writezone(zpfirst->z_name);\r
+}\r
+\r
+static void\r
+addtt(starttime, type)\r
+const time_t starttime;\r
+int type;\r
+{\r
+ if (starttime <= min_time ||\r
+ (timecnt == 1 && attypes[0].at < min_time)) {\r
+ gmtoffs[0] = gmtoffs[type];\r
+ isdsts[0] = isdsts[type];\r
+ ttisstds[0] = ttisstds[type];\r
+ ttisgmts[0] = ttisgmts[type];\r
+ if (abbrinds[type] != 0)\r
+ (void) strcpy(chars, &chars[abbrinds[type]]);\r
+ abbrinds[0] = 0;\r
+ charcnt = strlen(chars) + 1;\r
+ typecnt = 1;\r
+ timecnt = 0;\r
+ type = 0;\r
+ }\r
+ if (timecnt >= TZ_MAX_TIMES) {\r
+ error(_("too many transitions?!"));\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ attypes[timecnt].at = starttime;\r
+ attypes[timecnt].type = type;\r
+ ++timecnt;\r
+}\r
+\r
+static int\r
+addtype(gmtoff, abbr, isdst, ttisstd, ttisgmt)\r
+const long gmtoff;\r
+const char * const abbr;\r
+const int isdst;\r
+const int ttisstd;\r
+const int ttisgmt;\r
+{\r
+ register int i, j;\r
+\r
+ if (isdst != TRUE && isdst != FALSE) {\r
+ error(_("internal error - addtype called with bad isdst"));\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ if (ttisstd != TRUE && ttisstd != FALSE) {\r
+ error(_("internal error - addtype called with bad ttisstd"));\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ if (ttisgmt != TRUE && ttisgmt != FALSE) {\r
+ error(_("internal error - addtype called with bad ttisgmt"));\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ /*\r
+ ** See if there's already an entry for this zone type.\r
+ ** If so, just return its index.\r
+ */\r
+ for (i = 0; i < typecnt; ++i) {\r
+ if (gmtoff == gmtoffs[i] && isdst == isdsts[i] &&\r
+ strcmp(abbr, &chars[abbrinds[i]]) == 0 &&\r
+ ttisstd == ttisstds[i] &&\r
+ ttisgmt == ttisgmts[i])\r
+ return i;\r
+ }\r
+ /*\r
+ ** There isn't one; add a new one, unless there are already too\r
+ ** many.\r
+ */\r
+ if (typecnt >= TZ_MAX_TYPES) {\r
+ error(_("too many local time types"));\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ gmtoffs[i] = gmtoff;\r
+ isdsts[i] = isdst;\r
+ ttisstds[i] = ttisstd;\r
+ ttisgmts[i] = ttisgmt;\r
+\r
+ for (j = 0; j < charcnt; ++j)\r
+ if (strcmp(&chars[j], abbr) == 0)\r
+ break;\r
+ if (j == charcnt)\r
+ newabbr(abbr);\r
+ abbrinds[i] = j;\r
+ ++typecnt;\r
+ return i;\r
+}\r
+\r
+static void\r
+leapadd(t, positive, rolling, count)\r
+const time_t t;\r
+const int positive;\r
+const int rolling;\r
+int count;\r
+{\r
+ register int i, j;\r
+\r
+ if (leapcnt + (positive ? count : 1) > TZ_MAX_LEAPS) {\r
+ error(_("too many leap seconds"));\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ for (i = 0; i < leapcnt; ++i)\r
+ if (t <= trans[i]) {\r
+ if (t == trans[i]) {\r
+ error(_("repeated leap second moment"));\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ break;\r
+ }\r
+ do {\r
+ for (j = leapcnt; j > i; --j) {\r
+ trans[j] = trans[j - 1];\r
+ corr[j] = corr[j - 1];\r
+ roll[j] = roll[j - 1];\r
+ }\r
+ trans[i] = t;\r
+ corr[i] = positive ? 1L : eitol(-count);\r
+ roll[i] = rolling;\r
+ ++leapcnt;\r
+ } while (positive && --count != 0);\r
+}\r
+\r
+static void\r
+adjleap P((void))\r
+{\r
+ register int i;\r
+ register long last = 0;\r
+\r
+ /*\r
+ ** propagate leap seconds forward\r
+ */\r
+ for (i = 0; i < leapcnt; ++i) {\r
+ trans[i] = tadd(trans[i], last);\r
+ last = corr[i] += last;\r
+ }\r
+}\r
+\r
+static int\r
+yearistype(year, type)\r
+const int year;\r
+const char * const type;\r
+{\r
+ static char * buf;\r
+ int result;\r
+\r
+ if (type == NULL || *type == '\0')\r
+ return TRUE;\r
+ buf = erealloc(buf, (int) (132 + strlen(yitcommand) + strlen(type)));\r
+ (void) sprintf(buf, "%s %d %s", yitcommand, year, type);\r
+ result = system(buf);\r
+ if (WIFEXITED(result)) switch (WEXITSTATUS(result)) {\r
+ case 0:\r
+ return TRUE;\r
+ case 1:\r
+ return FALSE;\r
+ }\r
+ error(_("Wild result from command execution"));\r
+ (void) fprintf(stderr, _("%s: command was '%s', result was %d\n"),\r
+ progname, buf, result);\r
+ for ( ; ; )\r
+ (void) exit(EXIT_FAILURE);\r
+}\r
+\r
+static int\r
+lowerit(a)\r
+int a;\r
+{\r
+ a = (unsigned char) a;\r
+ return (isascii(a) && isupper(a)) ? tolower(a) : a;\r
+}\r
+\r
+static int\r
+ciequal(ap, bp) /* case-insensitive equality */\r
+register const char * ap;\r
+register const char * bp;\r
+{\r
+ while (lowerit(*ap) == lowerit(*bp++))\r
+ if (*ap++ == '\0')\r
+ return TRUE;\r
+ return FALSE;\r
+}\r
+\r
+static int\r
+itsabbr(abbr, word)\r
+register const char * abbr;\r
+register const char * word;\r
+{\r
+ if (lowerit(*abbr) != lowerit(*word))\r
+ return FALSE;\r
+ ++word;\r
+ while (*++abbr != '\0')\r
+ do {\r
+ if (*word == '\0')\r
+ return FALSE;\r
+ } while (lowerit(*word++) != lowerit(*abbr));\r
+ return TRUE;\r
+}\r
+\r
+static const struct lookup *\r
+byword(word, table)\r
+register const char * const word;\r
+register const struct lookup * const table;\r
+{\r
+ register const struct lookup * foundlp;\r
+ register const struct lookup * lp;\r
+\r
+ if (word == NULL || table == NULL)\r
+ return NULL;\r
+ /*\r
+ ** Look for exact match.\r
+ */\r
+ for (lp = table; lp->l_word != NULL; ++lp)\r
+ if (ciequal(word, lp->l_word))\r
+ return lp;\r
+ /*\r
+ ** Look for inexact match.\r
+ */\r
+ foundlp = NULL;\r
+ for (lp = table; lp->l_word != NULL; ++lp)\r
+ if (itsabbr(word, lp->l_word)) {\r
+ if (foundlp == NULL)\r
+ foundlp = lp;\r
+ else return NULL; /* multiple inexact matches */\r
+ }\r
+ return foundlp;\r
+}\r
+\r
+static char **\r
+getfields(cp)\r
+register char * cp;\r
+{\r
+ register char * dp;\r
+ register char ** array;\r
+ register int nsubs;\r
+\r
+ if (cp == NULL)\r
+ return NULL;\r
+ array = (char **) (void *)\r
+ emalloc((int) ((strlen(cp) + 1) * sizeof *array));\r
+ nsubs = 0;\r
+ for ( ; ; ) {\r
+ while (isascii(*cp) && isspace((unsigned char) *cp))\r
+ ++cp;\r
+ if (*cp == '\0' || *cp == '#')\r
+ break;\r
+ array[nsubs++] = dp = cp;\r
+ do {\r
+ if ((*dp = *cp++) != '"')\r
+ ++dp;\r
+ else while ((*dp = *cp++) != '"')\r
+ if (*dp != '\0')\r
+ ++dp;\r
+ else error(_("Odd number of quotation marks"));\r
+ } while (*cp != '\0' && *cp != '#' &&\r
+ (!isascii(*cp) || !isspace((unsigned char) *cp)));\r
+ if (isascii(*cp) && isspace((unsigned char) *cp))\r
+ ++cp;\r
+ *dp = '\0';\r
+ }\r
+ array[nsubs] = NULL;\r
+ return array;\r
+}\r
+\r
+static long\r
+oadd(t1, t2)\r
+const long t1;\r
+const long t2;\r
+{\r
+ register long t;\r
+\r
+ t = t1 + t2;\r
+ if ((t2 > 0 && t <= t1) || (t2 < 0 && t >= t1)) {\r
+ error(_("time overflow"));\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ return t;\r
+}\r
+\r
+static time_t\r
+tadd(t1, t2)\r
+const time_t t1;\r
+const long t2;\r
+{\r
+ register time_t t;\r
+\r
+ if (t1 == max_time && t2 > 0)\r
+ return max_time;\r
+ if (t1 == min_time && t2 < 0)\r
+ return min_time;\r
+ t = t1 + t2;\r
+ if ((t2 > 0 && t <= t1) || (t2 < 0 && t >= t1)) {\r
+ error(_("time overflow"));\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ return t;\r
+}\r
+\r
+/*\r
+** Given a rule, and a year, compute the date - in seconds since January 1,\r
+** 1970, 00:00 LOCAL time - in that year that the rule refers to.\r
+*/\r
+\r
+static time_t\r
+rpytime(rp, wantedy)\r
+register const struct rule * const rp;\r
+register const int wantedy;\r
+{\r
+ register int y, m, i;\r
+ register long dayoff; /* with a nod to Margaret O. */\r
+ register time_t t;\r
+\r
+ if (wantedy == INT_MIN)\r
+ return min_time;\r
+ if (wantedy == INT_MAX)\r
+ return max_time;\r
+ dayoff = 0;\r
+ m = TM_JANUARY;\r
+ y = EPOCH_YEAR;\r
+ while (wantedy != y) {\r
+ if (wantedy > y) {\r
+ i = len_years[isleap(y)];\r
+ ++y;\r
+ } else {\r
+ --y;\r
+ i = -len_years[isleap(y)];\r
+ }\r
+ dayoff = oadd(dayoff, eitol(i));\r
+ }\r
+ while (m != rp->r_month) {\r
+ i = len_months[isleap(y)][m];\r
+ dayoff = oadd(dayoff, eitol(i));\r
+ ++m;\r
+ }\r
+ i = rp->r_dayofmonth;\r
+ if (m == TM_FEBRUARY && i == 29 && !isleap(y)) {\r
+ if (rp->r_dycode == DC_DOWLEQ)\r
+ --i;\r
+ else {\r
+ error(_("use of 2/29 in non leap-year"));\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ }\r
+ --i;\r
+ dayoff = oadd(dayoff, eitol(i));\r
+ if (rp->r_dycode == DC_DOWGEQ || rp->r_dycode == DC_DOWLEQ) {\r
+ register long wday;\r
+\r
+#define LDAYSPERWEEK ((long) DAYSPERWEEK)\r
+ wday = eitol(EPOCH_WDAY);\r
+ /*\r
+ ** Don't trust mod of negative numbers.\r
+ */\r
+ if (dayoff >= 0)\r
+ wday = (wday + dayoff) % LDAYSPERWEEK;\r
+ else {\r
+ wday -= ((-dayoff) % LDAYSPERWEEK);\r
+ if (wday < 0)\r
+ wday += LDAYSPERWEEK;\r
+ }\r
+ while (wday != eitol(rp->r_wday))\r
+ if (rp->r_dycode == DC_DOWGEQ) {\r
+ dayoff = oadd(dayoff, (long) 1);\r
+ if (++wday >= LDAYSPERWEEK)\r
+ wday = 0;\r
+ ++i;\r
+ } else {\r
+ dayoff = oadd(dayoff, (long) -1);\r
+ if (--wday < 0)\r
+ wday = LDAYSPERWEEK - 1;\r
+ --i;\r
+ }\r
+ if (i < 0 || i >= len_months[isleap(y)][m]) {\r
+ error(_("no day in month matches rule"));\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ }\r
+ if (dayoff < 0 && !TYPE_SIGNED(time_t))\r
+ return min_time;\r
+ if (dayoff < min_time / SECSPERDAY)\r
+ return min_time;\r
+ if (dayoff > max_time / SECSPERDAY)\r
+ return max_time;\r
+ t = (time_t) dayoff * SECSPERDAY;\r
+ return tadd(t, rp->r_tod);\r
+}\r
+\r
+static void\r
+newabbr(string)\r
+const char * const string;\r
+{\r
+ register int i;\r
+\r
+ i = strlen(string) + 1;\r
+ if (charcnt + i > TZ_MAX_CHARS) {\r
+ error(_("too many, or too long, time zone abbreviations"));\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ (void) strcpy(&chars[charcnt], string);\r
+ charcnt += eitol(i);\r
+}\r
+\r
+static int\r
+mkdirs(argname)\r
+char * const argname;\r
+{\r
+ register char * name;\r
+ register char * cp;\r
+\r
+ if (argname == NULL || *argname == '\0')\r
+ return 0;\r
+ cp = name = ecpyalloc(argname);\r
+ while ((cp = strchr(cp + 1, '/')) != 0) {\r
+ *cp = '\0';\r
+#ifndef unix\r
+ /*\r
+ ** DOS drive specifier?\r
+ */\r
+ if (isalpha((unsigned char) name[0]) &&\r
+ name[1] == ':' && name[2] == '\0') {\r
+ *cp = '/';\r
+ continue;\r
+ }\r
+#endif /* !defined unix */\r
+ if (!itsdir(name)) {\r
+ /*\r
+ ** It doesn't seem to exist, so we try to create it.\r
+ ** Creation may fail because of the directory being\r
+ ** created by some other multiprocessor, so we get\r
+ ** to do extra checking.\r
+ */\r
+ if (mkdir(name, MKDIR_UMASK) != 0) {\r
+ const char *e = strerror(errno);\r
+\r
+ if (errno != EEXIST || !itsdir(name)) {\r
+ (void) fprintf(stderr,\r
+_("%s: Can't create directory %s: %s\n"),\r
+ progname, name, e);\r
+ ifree(name);\r
+ return -1;\r
+ }\r
+ }\r
+ }\r
+ *cp = '/';\r
+ }\r
+ ifree(name);\r
+ return 0;\r
+}\r
+\r
+static long\r
+eitol(i)\r
+const int i;\r
+{\r
+ long l;\r
+\r
+ l = i;\r
+ if ((i < 0 && l >= 0) || (i == 0 && l != 0) || (i > 0 && l <= 0)) {\r
+ (void) fprintf(stderr,\r
+ _("%s: %d did not sign extend correctly\n"),\r
+ progname, i);\r
+ (void) exit(EXIT_FAILURE);\r
+ }\r
+ return l;\r
+}\r
+\r
+/*\r
+** UNIX was a registered trademark of The Open Group in 2003.\r
+*/\r