Recent changes caused zone.tab to refer to links defined in the
'backward' file, which means it no longer works in the now-rare case
where 'backward' is not used. Fix this by changing zone.tab to refer
to the primary name of each zone.
* checktab.awk: Adjust to check the new setup.
* zone.tab: Replace backward links in the 3rd column with the primary
zone names. This lets us fix a longstanding problem with Vietnam, as
zone.tab can now have a separate entry for north Vietnam's different
time zone history in the 1970s (this was already true of zone1970.tab).
---
checktab.awk | 48 +++++++--------
zone.tab | 161 ++++++++++++++++++++++++++-------------------------
2 files changed, 105 insertions(+), 104 deletions(-)
diff --git a/checktab.awk b/checktab.awk
index 54ac0a6..d5317ac 100644
--- a/checktab.awk
+++ b/checktab.awk
@@ -58,11 +58,12 @@ BEGIN {
zone_table, zone_NR >>"/dev/stderr"
status = 1
}
- split($1, cca, /,/)
- cc = cca[1]
+ ccs = input_ccs[zone_NR] = $1
coordinates = $2
tz = $3
- comments = $4
+ comments = input_comments[zone_NR] = $4
+ split(ccs, cca, /,/)
+ cc = cca[1]
# Don't complain about a special case for Crimea in zone.tab.
# FIXME: zone.tab should be removed, since it is obsolete.
@@ -77,12 +78,9 @@ BEGIN {
cc0 = cc
tz0 = tz
tztab[tz] = 1
- tz2comments[tz] = comments
tz2NR[tz] = zone_NR
for (i in cca) {
cc = cca[i]
- cctz = cc tz
- cctztab[cctz] = 1
if (cc2name[cc]) {
cc_used[cc]++
} else {
@@ -99,27 +97,27 @@ BEGIN {
}
}
- for (cctz in cctztab) {
- cc = substr (cctz, 1, 2)
- tz = substr (cctz, 3)
- if (1 < cc_used[cc]) {
- comments_needed[tz] = cc
- }
- }
- for (cctz in cctztab) {
- cc = substr (cctz, 1, 2)
- tz = substr (cctz, 3)
- if (!comments_needed[tz] && tz2comments[tz]) {
+ for (i = 1; i <= zone_NR; i++) {
+ ccs = input_ccs[i]
+ if (!ccs) continue
+ comments = input_comments[i]
+ split(ccs, cca, /,/)
+ used_max = 0
+ for (j in cca) {
+ cc = cca[j]
+ if (used_max < cc_used[cc]) {
+ used_max = cc_used[cc]
+ }
+ }
+ if (used_max <= 1 && comments) {
printf "%s:%d: unnecessary comment '%s'\n", \
- zone_table, tz2NR[tz], tz2comments[tz] \
- >>"/dev/stderr"
- tz2comments[tz] = 0
+ zone_table, i, comments \
+ >>"/dev/stderr"
status = 1
- } else if (comments_needed[tz] && !tz2comments[tz]) {
+ } else if (1 < cc_used[cc] && !comments) {
printf "%s:%d: missing comment for %s\n", \
- zone_table, tz2NR[tz], comments_needed[tz] \
+ zone_table, i, cc \
>>"/dev/stderr"
- tz2comments[tz] = 1
status = 1
}
}
@@ -172,14 +170,12 @@ END {
status = 1
}
}
- if (zone_table != "zone.tab") {
- for (tz in tztab) {
+ for (tz in tztab) {
if (!zoneSeen[tz]) {
printf "%s:%d: no Zone table for '%s'\n", \
zone_table, tz2NR[tz], tz >>"/dev/stderr"
status = 1
}
- }
}
if (0 < want_warnings) {
for (cc in cc2name) {
diff --git a/zone.tab b/zone.tab
index 14fceb9..fe53f0a 100644
--- a/zone.tab
+++ b/zone.tab
@@ -16,6 +16,10 @@
# clocks have agreed since 1970; this is a narrower definition than
# that of zone1970.tab.
#
+# Unlike zone1970.tab, this file's third column can contain duplicates,
+# and a row's third column does not necessarily name a location within
+# the country identified by the row's first column.
+#
# This table is intended as an aid for users, to help them select timezones
# appropriate for their practical needs. It is not intended to take or
# endorse any position on legal or territorial claims.
@@ -25,12 +29,12 @@
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
+AG +1703-06148 America/Port_of_Spain
+AI +1812-06304 America/Port_of_Spain
AL +4120+01950 Europe/Tirane
AM +4011+04430 Asia/Yerevan
-AO -0848+01314 Africa/Luanda
-AQ -7750+16636 Antarctica/McMurdo New Zealand time - McMurdo, South Pole
+AO -0848+01314 Africa/Lagos
+AQ -7750+16636 Pacific/Auckland New Zealand time - McMurdo, South Pole
AQ -6617+11031 Antarctica/Casey Casey
AQ -6835+07758 Antarctica/Davis Davis
AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville
@@ -66,23 +70,23 @@ AU -3455+13835 Australia/Adelaide South Australia
AU -1228+13050 Australia/Darwin Northern Territory
AU -3157+11551 Australia/Perth Western Australia (most areas)
AU -3143+12852 Australia/Eucla Western Australia (Eucla)
-AW +1230-06958 America/Aruba
-AX +6006+01957 Europe/Mariehamn
+AW +1230-06958 America/Curacao
+AX +6006+01957 Europe/Helsinki
AZ +4023+04951 Asia/Baku
-BA +4352+01825 Europe/Sarajevo
+BA +4352+01825 Europe/Belgrade
BB +1306-05937 America/Barbados
BD +2343+09025 Asia/Dhaka
BE +5050+00420 Europe/Brussels
-BF +1222-00131 Africa/Ouagadougou
+BF +1222-00131 Africa/Abidjan
BG +4241+02319 Europe/Sofia
-BH +2623+05035 Asia/Bahrain
-BI -0323+02922 Africa/Bujumbura
-BJ +0629+00237 Africa/Porto-Novo
-BL +1753-06251 America/St_Barthelemy
+BH +2623+05035 Asia/Qatar
+BI -0323+02922 Africa/Maputo
+BJ +0629+00237 Africa/Lagos
+BL +1753-06251 America/Port_of_Spain
BM +3217-06446 Atlantic/Bermuda
BN +0456+11455 Asia/Brunei
BO -1630-06809 America/La_Paz
-BQ +120903-0681636 America/Kralendijk
+BQ +120903-0681636 America/Curacao
BR -0351-03225 America/Noronha Atlantic islands
BR -0127-04829 America/Belem Para (east); Amapa
BR -0343-03830 America/Fortaleza Brazil (northeast: MA, PI, CE, RN, PB)
@@ -101,7 +105,7 @@ BR -0640-06952 America/Eirunepe Amazonas (west)
BR -0958-06748 America/Rio_Branco Acre
BS +2505-07721 America/Nassau
BT +2728+08939 Asia/Thimphu
-BW -2439+02555 Africa/Gaborone
+BW -2439+02555 Africa/Maputo
BY +5354+02734 Europe/Minsk
BZ +1730-08812 America/Belize
CA +4734-05243 America/St_Johns Newfoundland; Labrador (southeast)
@@ -133,17 +137,17 @@ CA +6043-13503 America/Whitehorse MST - Yukon (east)
CA +6404-13925 America/Dawson MST - Yukon (west)
CA +4916-12307 America/Vancouver Pacific - BC (most areas)
CC -1210+09655 Indian/Cocos
-CD -0418+01518 Africa/Kinshasa Dem. Rep. of Congo (west)
-CD -1140+02728 Africa/Lubumbashi Dem. Rep. of Congo (east)
-CF +0422+01835 Africa/Bangui
-CG -0416+01517 Africa/Brazzaville
+CD -0418+01518 Africa/Lagos Dem. Rep. of Congo (west)
+CD -1140+02728 Africa/Maputo Dem. Rep. of Congo (east)
+CF +0422+01835 Africa/Lagos
+CG -0416+01517 Africa/Lagos
CH +4723+00832 Europe/Zurich
CI +0519-00402 Africa/Abidjan
CK -2114-15946 Pacific/Rarotonga
CL -3327-07040 America/Santiago Chile (most areas)
CL -5309-07055 America/Punta_Arenas Region of Magallanes
CL -2709-10926 Pacific/Easter Easter Island
-CM +0403+00942 Africa/Douala
+CM +0403+00942 Africa/Lagos
CN +3114+12128 Asia/Shanghai Beijing Time
CN +4348+08735 Asia/Urumqi Xinjiang Time
CO +0436-07405 America/Bogota
@@ -156,10 +160,10 @@ CY +3510+03322 Asia/Nicosia Cyprus (most areas)
CY +3507+03357 Asia/Famagusta Northern Cyprus
CZ +5005+01426 Europe/Prague
DE +5230+01322 Europe/Berlin Germany (most areas)
-DE +4742+00841 Europe/Busingen Busingen
-DJ +1136+04309 Africa/Djibouti
+DE +4742+00841 Europe/Zurich Swiss time
+DJ +1136+04309 Africa/Nairobi
DK +5540+01235 Europe/Copenhagen
-DM +1518-06124 America/Dominica
+DM +1518-06124 America/Port_of_Spain
DO +1828-06954 America/Santo_Domingo
DZ +3647+00303 Africa/Algiers
EC -0210-07950 America/Guayaquil Ecuador (mainland)
@@ -167,11 +171,11 @@ 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/Asmara
+ER +1520+03853 Africa/Nairobi
ES +4024-00341 Europe/Madrid Spain (mainland)
ES +3553-00519 Africa/Ceuta Ceuta, Melilla
ES +2806-01524 Atlantic/Canary Canary Islands
-ET +0902+03842 Africa/Addis_Ababa
+ET +0902+03842 Africa/Nairobi
FI +6010+02458 Europe/Helsinki
FJ -1808+17825 Pacific/Fiji
FK -5142-05751 Atlantic/Stanley
@@ -180,22 +184,22 @@ FM +0658+15813 Pacific/Pohnpei Pohnpei/Ponape
FM +0519+16259 Pacific/Kosrae Kosrae
FO +6201-00646 Atlantic/Faroe
FR +4852+00220 Europe/Paris
-GA +0023+00927 Africa/Libreville
+GA +0023+00927 Africa/Lagos
GB +513030-0000731 Europe/London
-GD +1203-06145 America/Grenada
+GD +1203-06145 America/Port_of_Spain
GE +4143+04449 Asia/Tbilisi
GF +0456-05220 America/Cayenne
-GG +492717-0023210 Europe/Guernsey
+GG +492717-0023210 Europe/London
GH +0533-00013 Africa/Accra
GI +3608-00521 Europe/Gibraltar
GL +6411-05144 America/Nuuk Greenland (most areas)
GL +7646-01840 America/Danmarkshavn National Park (east coast)
GL +7029-02158 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
+GM +1328-01639 Africa/Abidjan
+GN +0931-01343 Africa/Abidjan
+GP +1614-06132 America/Port_of_Spain
+GQ +0345+00847 Africa/Lagos
GR +3758+02343 Europe/Athens
GS -5416-03632 Atlantic/South_Georgia
GT +1438-09031 America/Guatemala
@@ -204,7 +208,7 @@ 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
+HR +4548+01558 Europe/Belgrade
HT +1832-07220 America/Port-au-Prince
HU +4730+01905 Europe/Budapest
ID -0610+10648 Asia/Jakarta Java, Sumatra
@@ -213,29 +217,29 @@ ID -0507+11924 Asia/Makassar Borneo (east, south); Sulawesi/Celebes, Bali, Nusa
ID -0232+14042 Asia/Jayapura New Guinea (West Papua / Irian Jaya); Malukus/Moluccas
IE +5320-00615 Europe/Dublin
IL +314650+0351326 Asia/Jerusalem
-IM +5409-00428 Europe/Isle_of_Man
+IM +5409-00428 Europe/London
IN +2232+08822 Asia/Kolkata
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
-JE +491101-0020624 Europe/Jersey
+JE +491101-0020624 Europe/London
JM +175805-0764736 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
+KH +1133+10455 Asia/Bangkok
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
+KM -1141+04316 Africa/Nairobi
+KN +1718-06243 America/Port_of_Spain
KP +3901+12545 Asia/Pyongyang
KR +3733+12658 Asia/Seoul
-KW +2920+04759 Asia/Kuwait
-KY +1918-08123 America/Cayman
+KW +2920+04759 Asia/Riyadh
+KY +1918-08123 America/Panama
KZ +4315+07657 Asia/Almaty Kazakhstan (most areas)
KZ +4448+06528 Asia/Qyzylorda Qyzylorda/Kyzylorda/Kzyl-Orda
KZ +5312+06337 Asia/Qostanay Qostanay/Kostanay/Kustanay
@@ -243,13 +247,13 @@ KZ +5017+05710 Asia/Aqtobe Aqtobe/Aktobe
KZ +4431+05016 Asia/Aqtau Mangghystau/Mankistau
KZ +4707+05156 Asia/Atyrau Atyrau/Atirau/Gur'yev
KZ +5113+05121 Asia/Oral West Kazakhstan
-LA +1758+10236 Asia/Vientiane
+LA +1758+10236 Asia/Bangkok
LB +3353+03530 Asia/Beirut
-LC +1401-06100 America/St_Lucia
-LI +4709+00931 Europe/Vaduz
+LC +1401-06100 America/Port_of_Spain
+LI +4709+00931 Europe/Zurich
LK +0656+07951 Asia/Colombo
LR +0618-01047 Africa/Monrovia
-LS -2928+02730 Africa/Maseru
+LS -2928+02730 Africa/Johannesburg
LT +5441+02519 Europe/Vilnius
LU +4936+00609 Europe/Luxembourg
LV +5657+02406 Europe/Riga
@@ -257,26 +261,26 @@ LY +3254+01311 Africa/Tripoli
MA +3339-00735 Africa/Casablanca
MC +4342+00723 Europe/Monaco
MD +4700+02850 Europe/Chisinau
-ME +4226+01916 Europe/Podgorica
-MF +1804-06305 America/Marigot
-MG -1855+04731 Indian/Antananarivo
+ME +4226+01916 Europe/Belgrade
+MF +1804-06305 America/Port_of_Spain
+MG -1855+04731 Africa/Nairobi
MH +0709+17112 Pacific/Majuro Marshall Islands (most areas)
MH +0905+16720 Pacific/Kwajalein Kwajalein
-MK +4159+02126 Europe/Skopje
-ML +1239-00800 Africa/Bamako
+MK +4159+02126 Europe/Belgrade
+ML +1239-00800 Africa/Abidjan
MM +1647+09610 Asia/Yangon
MN +4755+10653 Asia/Ulaanbaatar Mongolia (most areas)
MN +4801+09139 Asia/Hovd Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan
MN +4804+11430 Asia/Choibalsan Dornod, Sukhbaatar
MO +221150+1133230 Asia/Macau
-MP +1512+14545 Pacific/Saipan
+MP +1512+14545 Pacific/Guam
MQ +1436-06105 America/Martinique
-MR +1806-01557 Africa/Nouakchott
-MS +1643-06213 America/Montserrat
+MR +1806-01557 Africa/Abidjan
+MS +1643-06213 America/Port_of_Spain
MT +3554+01431 Europe/Malta
MU -2010+05730 Indian/Mauritius
MV +0410+07330 Indian/Maldives
-MW -1547+03500 Africa/Blantyre
+MW -1547+03500 Africa/Maputo
MX +1924-09909 America/Mexico_City Central Time
MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo
MX +2058-08937 America/Merida Central Time - Campeche, Yucatan
@@ -293,7 +297,7 @@ MY +0133+11020 Asia/Kuching Sabah, Sarawak
MZ -2558+03235 Africa/Maputo
NA -2234+01706 Africa/Windhoek
NC -2216+16627 Pacific/Noumea
-NE +1331+00207 Africa/Niamey
+NE +1331+00207 Africa/Lagos
NF -2903+16758 Pacific/Norfolk
NG +0627+00324 Africa/Lagos
NI +1209-08617 America/Managua
@@ -304,7 +308,7 @@ NR -0031+16655 Pacific/Nauru
NU -1901-16955 Pacific/Niue
NZ -3652+17446 Pacific/Auckland New Zealand (most areas)
NZ -4357-17633 Pacific/Chatham Chatham Islands
-OM +2336+05835 Asia/Muscat
+OM +2336+05835 Asia/Dubai
PA +0858-07932 America/Panama
PE -1203-07703 America/Lima
PF -1732-14934 Pacific/Tahiti Society Islands
@@ -359,32 +363,32 @@ RU +4658+14242 Asia/Sakhalin MSK+08 - Sakhalin Island
RU +6728+15343 Asia/Srednekolymsk MSK+08 - Sakha (E); North Kuril Is
RU +5301+15839 Asia/Kamchatka MSK+09 - Kamchatka
RU +6445+17729 Asia/Anadyr MSK+09 - Bering Sea
-RW -0157+03004 Africa/Kigali
+RW -0157+03004 Africa/Maputo
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
-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
+SH -1555-00542 Africa/Abidjan
+SI +4603+01431 Europe/Belgrade
+SJ +7800+01600 Europe/Oslo
+SK +4809+01707 Europe/Prague
+SL +0830-01315 Africa/Abidjan
+SM +4355+01228 Europe/Rome
+SN +1440-01726 Africa/Abidjan
+SO +0204+04522 Africa/Nairobi
SR +0550-05510 America/Paramaribo
SS +0451+03137 Africa/Juba
ST +0020+00644 Africa/Sao_Tome
SV +1342-08912 America/El_Salvador
-SX +180305-0630250 America/Lower_Princes
+SX +180305-0630250 America/Curacao
SY +3330+03618 Asia/Damascus
-SZ -2618+03106 Africa/Mbabane
+SZ -2618+03106 Africa/Johannesburg
TC +2128-07108 America/Grand_Turk
TD +1207+01503 Africa/Ndjamena
TF -492110+0701303 Indian/Kerguelen
-TG +0608+00113 Africa/Lome
+TG +0608+00113 Africa/Abidjan
TH +1345+10031 Asia/Bangkok
TJ +3835+06848 Asia/Dushanbe
TK -0922-17114 Pacific/Fakaofo
@@ -396,12 +400,12 @@ 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
+TZ -0648+03917 Africa/Nairobi
UA +5026+03031 Europe/Kiev Ukraine (most areas)
UA +4837+02218 Europe/Uzhgorod Transcarpathia
UA +4750+03510 Europe/Zaporozhye Zaporozhye and east Lugansk
-UG +0019+03225 Africa/Kampala
-UM +2813-17722 Pacific/Midway Midway Islands
+UG +0019+03225 Africa/Nairobi
+UM +2813-17722 Pacific/Pago_Pago Midway Islands
UM +1917+16637 Pacific/Wake Wake Island
US +404251-0740023 America/New_York Eastern (most areas)
US +421953-0830245 America/Detroit Eastern - MI (most areas)
@@ -435,17 +439,18 @@ US +211825-1575130 Pacific/Honolulu Hawaii
UY -345433-0561245 America/Montevideo
UZ +3940+06648 Asia/Samarkand Uzbekistan (west)
UZ +4120+06918 Asia/Tashkent Uzbekistan (east)
-VA +415408+0122711 Europe/Vatican
-VC +1309-06114 America/St_Vincent
+VA +415408+0122711 Europe/Rome
+VC +1309-06114 America/Port_of_Spain
VE +1030-06656 America/Caracas
-VG +1827-06437 America/Tortola
-VI +1821-06456 America/St_Thomas
-VN +1045+10640 Asia/Ho_Chi_Minh
+VG +1827-06437 America/Port_of_Spain
+VI +1821-06456 America/Port_of_Spain
+VN +1045+10640 Asia/Bangkok Vietnam (north)
+VN +1045+10640 Asia/Ho_Chi_Minh Vietnam (south)
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
+YE +1245+04512 Asia/Riyadh
+YT -1247+04514 Africa/Nairobi
ZA -2615+02800 Africa/Johannesburg
-ZM -1525+02817 Africa/Lusaka
-ZW -1750+03103 Africa/Harare
+ZM -1525+02817 Africa/Maputo
+ZW -1750+03103 Africa/Maputo
--
2.27.0