Skip to content

Commit

Permalink
Fix minor problems found by static checking.
Browse files Browse the repository at this point in the history
Mostly this moves links so that files can be zic'ed standalone.
* antarctica (Antarctica/McMurdo): Move to australasia,
* australasia (Pacific/Johnston): Move to northamerica.
* checktab.awk: Add special case for America/Montreal, pending
the tzwinnow approach.
* northamerica (America/Anguilla, America/Dominica, America/Grenada)
(America/Guadeloupe, America/St_Barthelemy, America/Marigot)
(America/Montserrat, America/St_Kitts, America/St_Lucia)
(America/St_Vincent, America/Tortola, America/St_Thomas):
Move to southamerica.
* southamerica: Receive above-described moves.
* zic.c (writezone): Remove unused local.
  • Loading branch information
eggert committed Sep 11, 2013
1 parent fe717b1 commit 2022cdd
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 18 deletions.
4 changes: 2 additions & 2 deletions antarctica
Original file line number Diff line number Diff line change
Expand Up @@ -360,5 +360,5 @@ Zone Antarctica/Palmer 0 - zzz 1965
# makes all of the clocks run fast. So every couple of days,
# we have to go around and set them back 5 minutes or so.
# Maybe if we let them run fast all of the time, we'd get to leave here sooner!!

Link Pacific/Auckland Antarctica/McMurdo
#
# See 'australasia' for Antarctica/McMurdo.
3 changes: 2 additions & 1 deletion australasia
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ Zone Pacific/Auckland 11:39:04 - LMT 1868 Nov 2
Zone Pacific/Chatham 12:13:48 - LMT 1957 Jan 1
12:45 Chatham CHA%sT

Link Pacific/Auckland Antarctica/McMurdo

# Auckland Is
# uninhabited; Maori and Moriori, colonial settlers, pastoralists, sealers,
Expand Down Expand Up @@ -768,7 +769,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901
# We have no better information, so for now, assume this has been true
# indefinitely into the past.
#
Link Pacific/Honolulu Pacific/Johnston
# See 'northamerica' for Pacific/Johnston.

# Kingman
# uninhabited
Expand Down
3 changes: 3 additions & 0 deletions checktab.awk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ BEGIN {
if (!zone_table) zone_table = "zone.tab"
if (!want_warnings) want_warnings = -1

# A special (and we hope temporary) case.
tztab["America/Montreal"] = 1

while (getline <iso_table) {
iso_NR++
if ($0 ~ /^#/) continue
Expand Down
23 changes: 9 additions & 14 deletions northamerica
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,8 @@ Zone Pacific/Honolulu -10:31:26 - LMT 1896 Jan 13 12:00 #Schmitt&Cox
-10:30 - HST 1947 Jun 8 2:00 #Schmitt&Cox+2
-10:00 - HST

Link Pacific/Honolulu Pacific/Johnston

# Now we turn to US areas that have diverged from the consensus since 1970.

# Arizona mostly uses MST.
Expand Down Expand Up @@ -2547,7 +2549,7 @@ Zone America/Santa_Isabel -7:39:28 - LMT 1922 Jan 1 0:20:32
###############################################################################

# Anguilla
Link America/Port_of_Spain America/Anguilla
# See 'southamerica'.

# Antigua and Barbuda
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Expand Down Expand Up @@ -2869,7 +2871,7 @@ Zone America/Havana -5:29:28 - LMT 1890
-5:00 Cuba C%sT

# Dominica
Link America/Port_of_Spain America/Dominica
# See 'southamerica'.

# Dominican Republic

Expand Down Expand Up @@ -2918,13 +2920,10 @@ Zone America/El_Salvador -5:56:48 - LMT 1921 # San Salvador
-6:00 Salv C%sT

# Grenada
Link America/Port_of_Spain America/Grenada
# Guadeloupe
Link America/Port_of_Spain America/Guadeloupe
# St Barthelemy
Link America/Port_of_Spain America/St_Barthelemy
# St Martin (French part)
Link America/Port_of_Spain America/Marigot
# See 'southamerica'.

# Guatemala
#
Expand Down Expand Up @@ -3086,7 +3085,7 @@ Zone America/Martinique -4:04:20 - LMT 1890 # Fort-de-France
-4:00 - AST

# Montserrat
Link America/Port_of_Spain America/Montserrat
# See 'southamerica'.

# Nicaragua
#
Expand Down Expand Up @@ -3168,10 +3167,8 @@ Zone America/Puerto_Rico -4:24:25 - LMT 1899 Mar 28 12:00 # San Juan
-4:00 - AST

# St Kitts-Nevis
Link America/Port_of_Spain America/St_Kitts

# St Lucia
Link America/Port_of_Spain America/St_Lucia
# See 'southamerica'.

# St Pierre and Miquelon
# There are too many St Pierres elsewhere, so we'll use 'Miquelon'.
Expand All @@ -3182,7 +3179,7 @@ Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre
-3:00 Canada PM%sT

# St Vincent and the Grenadines
Link America/Port_of_Spain America/St_Vincent
# See 'southamerica'.

# Turks and Caicos
#
Expand Down Expand Up @@ -3216,7 +3213,5 @@ Zone America/Grand_Turk -4:44:32 - LMT 1890
-5:00 TC E%sT

# British Virgin Is
Link America/Port_of_Spain America/Tortola

# Virgin Is
Link America/Port_of_Spain America/St_Thomas
# See 'southamerica'.
13 changes: 13 additions & 0 deletions southamerica
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,19 @@ Zone America/Paramaribo -3:40:40 - LMT 1911
Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2
-4:00 - AST

Link America/Port_of_Spain America/Anguilla
Link America/Port_of_Spain America/Dominica
Link America/Port_of_Spain America/Grenada
Link America/Port_of_Spain America/Guadeloupe
Link America/Port_of_Spain America/Marigot
Link America/Port_of_Spain America/Montserrat
Link America/Port_of_Spain America/St_Barthelemy
Link America/Port_of_Spain America/St_Kitts
Link America/Port_of_Spain America/St_Lucia
Link America/Port_of_Spain America/St_Thomas
Link America/Port_of_Spain America/St_Vincent
Link America/Port_of_Spain America/Tortola

# Uruguay
# From Paul Eggert (1993-11-18):
# Uruguay wins the prize for the strangest peacetime manipulation of the rules.
Expand Down
1 change: 0 additions & 1 deletion zic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,6 @@ writezone(const char *const name, const char *const string)
fprintf(fp, "name=%s%c", name, 0);
for (i = 0; i < genoptions; i++) {
register char const *v = genoption[i];
register int namelen = strchr(v, '=') - v;
fprintf(fp, "%s%c", v, 0);
}
fprintf(fp, "%c\n%s\n", 0, string);
Expand Down

0 comments on commit 2022cdd

Please sign in to comment.