[PATCH 0/4] checktab.awk and zone tabs
This patch set applies on top of the two sets I posted on Jan 20 2016 with Subject: [PATCH 0/5] tzselect.ksh [PATCH 1/3] zone*.tab: make consistent 'most locations' Paul, I just noticed I used the wrong style commit messages on the first to sets. If you'd like me to fix them and resubmit V2, just let me know. J William Piggott (4): checktab.awk: fix comment (field 4) checks checktab.awk: don't repeat missing comment errors zone1970.tab: update column 4 definition Remove unneeded zone tab comments NEWS | 8 ++++++++ checktab.awk | 8 +++++++- zone.tab | 20 ++++++++++---------- zone1970.tab | 21 +++++++++++---------- 4 files changed, 36 insertions(+), 21 deletions(-) --- All of the patch sets are from the same branch of my github account here is the request-pull output: The following changes since commit 9e588f4c0bc2a1861c923aaa7760ebc7b024d885: Cite Ogle's 2015 book on history of civil time (2016-01-11 16:21:15 -0800) are available in the git repository at: git@github.com:jwpi/tz.git tzselect for you to fetch changes up to a7a2ef246e669c30533e5fd1cb01ef85fe921935: Remove unneeded zone tab comments (2016-01-23 18:57:43 -0500) ---------------------------------------------------------------- J William Piggott (12): zone*.tab: make consistent 'most locations' zone*.tab: fix capitalization zone*.tab: fix Salta comment tzselect.ksh: TZ validation bugs tzselect.ksh: regions list to inclusive tzselect.ksh: sort regions list tzselect.ksh: time scales assumed tzselect.ksh: add script mode option checktab.awk: fix comment (field 4) checks checktab.awk: don't repeat missing comment errors zone1970.tab: update column 4 definition Remove unneeded zone tab comments NEWS | 8 ++++++++ checktab.awk | 8 +++++++- tzselect.ksh | 47 ++++++++++++++++++++++++++++++----------------- zone.tab | 44 ++++++++++++++++++++++---------------------- zone1970.tab | 51 ++++++++++++++++++++++++++------------------------- 5 files changed, 93 insertions(+), 65 deletions(-)
* checktab.awk: Now that tzselect uses both country and continent as criteria for region list building, checktab needs to do the same when testing zone tabs for comment (field 4) requirements. Signed-off-by: J William Piggott <elseifthen@gmx.com> --- checktab.awk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/checktab.awk b/checktab.awk index 6c2e41b..bbf7ce9 100644 --- a/checktab.awk +++ b/checktab.awk @@ -62,6 +62,7 @@ BEGIN { cc = cca[1] coordinates = $2 tz = $3 + continent = substr($3, 1, index($3, "/") - 1) comments = $4 if (cc < cc0) { printf "%s:%d: country code '%s' is out of order\n", \ @@ -76,8 +77,10 @@ BEGIN { cc = cca[i] cctz = cc tz cctztab[cctz] = 1 + ccct = cc continent if (cc2name[cc]) { cc_used[cc]++ + ccct_used[ccct]++ } else { printf "%s:%d: %s: unknown country code\n", \ zone_table, zone_NR, cc >>"/dev/stderr" @@ -95,7 +98,9 @@ BEGIN { for (cctz in cctztab) { cc = substr (cctz, 1, 2) tz = substr (cctz, 3) - if (1 < cc_used[cc]) { + continent = substr(tz, 1, index(tz, "/") - 1) + ccct = cc continent + if (1 < ccct_used[ccct]) { comments_needed[tz] = cc } }
* checktab.awk: Do not repeat zone tab 'missing comment' error messages for a given time zone. This happens when there are multiple CC's for a zone tab line item which is missing a required comment (field 4). Signed-off-by: J William Piggott <elseifthen@gmx.com> --- checktab.awk | 1 + 1 file changed, 1 insertion(+) diff --git a/checktab.awk b/checktab.awk index bbf7ce9..f985c0a 100644 --- a/checktab.awk +++ b/checktab.awk @@ -117,6 +117,7 @@ BEGIN { printf "%s:%d: missing comment for %s\n", \ zone_table, tz2NR[tz], comments_needed[tz] \ >>"/dev/stderr" + tz2comments[tz] = 1 status = 1 } }
Thanks, I installed this one.
* zone1970.tab: Update the column 4 definition, adding that global regions are now part of the criteria. Signed-off-by: J William Piggott <elseifthen@gmx.com> --- zone1970.tab | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zone1970.tab b/zone1970.tab index c1b9222..19e2157 100644 --- a/zone1970.tab +++ b/zone1970.tab @@ -18,7 +18,8 @@ # Please see the 'Theory' file for how zone names are chosen. # If multiple zones overlap a country, each has a row in the # table, with each column 1 containing the country code. -# 4. Comments; present if and only if a country has multiple zones. +# 4. Comments; present if and only if a country has multiple zones +# within the same global region (first segment of column 3). # # If a zone covers multiple countries, the most-populous city is used, # and that country is listed first in column 1; any other countries
* zone.tab, zone1970.tab: remove comments that are no longer required, because multiple zone lists must now be in the same global region. * NEWS: Document changes to tzselect, checktab.awk, and zone tab files. Signed-off-by: J William Piggott <elseifthen@gmx.com> --- NEWS | 8 ++++++++ zone.tab | 20 ++++++++++---------- zone1970.tab | 18 +++++++++--------- 3 files changed, 27 insertions(+), 19 deletions(-) diff --git a/NEWS b/NEWS index 14a87ac..54875a0 100644 --- a/NEWS +++ b/NEWS @@ -28,6 +28,14 @@ Unreleased, experimental changes Asia/Karachi's two transition times in 2002 were off by a minute. (Thanks to Matt Johnson.) + Changes affecting code + + tzselect now uses the global region (continent or ocean), in + addition to country code, as criteria for building the local region + select list. checktab.awk was likewise updated for testing the + requirement of zone comments in the zone tab files. The zone tab + files were updated accordingly. + Changes affecting build procedure An installer can now combine leap seconds with use of the backzone file, diff --git a/zone.tab b/zone.tab index e7a1fc1..cd63ea5 100644 --- a/zone.tab +++ b/zone.tab @@ -55,7 +55,7 @@ AR -5448-06818 America/Argentina/Ushuaia Tierra del Fuego (TF) AS -1416-17042 Pacific/Pago_Pago AT +4813+01620 Europe/Vienna AU -3133+15905 Australia/Lord_Howe Lord Howe Island -AU -5430+15857 Antarctica/Macquarie Macquarie Island +AU -5430+15857 Antarctica/Macquarie AU -4253+14719 Australia/Hobart Tasmania - most locations AU -3956+14352 Australia/Currie Tasmania - King Island AU -3749+14458 Australia/Melbourne Victoria @@ -141,8 +141,8 @@ 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 Chile - most locations -CL -2709-10926 Pacific/Easter Easter Island +CL -3327-07040 America/Santiago +CL -2709-10926 Pacific/Easter CM +0403+00942 Africa/Douala CN +3114+12128 Asia/Shanghai Beijing Time CN +4348+08735 Asia/Urumqi Xinjiang Time @@ -161,15 +161,15 @@ 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 +EC -0210-07950 America/Guayaquil +EC -0054-08936 Pacific/Galapagos EE +5925+02445 Europe/Tallinn EG +3003+03115 Africa/Cairo EH +2709-01312 Africa/El_Aaiun ER +1520+03853 Africa/Asmara -ES +4024-00341 Europe/Madrid mainland -ES +3553-00519 Africa/Ceuta Ceuta & Melilla -ES +2806-01524 Atlantic/Canary Canary Islands +ES +4024-00341 Europe/Madrid +ES +3553-00519 Africa/Ceuta +ES +2806-01524 Atlantic/Canary ET +0902+03842 Africa/Addis_Ababa FI +6010+02458 Europe/Helsinki FJ -1808+17825 Pacific/Fiji @@ -317,7 +317,7 @@ PN -2504-13005 Pacific/Pitcairn PR +182806-0660622 America/Puerto_Rico PS +3130+03428 Asia/Gaza Gaza Strip PS +313200+0350542 Asia/Hebron West Bank -PT +3843-00908 Europe/Lisbon mainland +PT +3843-00908 Europe/Lisbon PT +3238-01654 Atlantic/Madeira Madeira Islands PT +3744-02540 Atlantic/Azores Azores PW +0720+13429 Pacific/Palau @@ -420,7 +420,7 @@ US +550737-1313435 America/Metlakatla Alaska Time - Annette Island 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 +US +211825-1575130 Pacific/Honolulu UY -3453-05611 America/Montevideo UZ +3940+06648 Asia/Samarkand west Uzbekistan UZ +4120+06918 Asia/Tashkent east Uzbekistan diff --git a/zone1970.tab b/zone1970.tab index 19e2157..337cdfb 100644 --- a/zone1970.tab +++ b/zone1970.tab @@ -63,7 +63,7 @@ AR -5448-06818 America/Argentina/Ushuaia Tierra del Fuego (TF) AS,UM -1416-17042 Pacific/Pago_Pago Samoa, Midway AT +4813+01620 Europe/Vienna AU -3133+15905 Australia/Lord_Howe Lord Howe Island -AU -5430+15857 Antarctica/Macquarie Macquarie Island +AU -5430+15857 Antarctica/Macquarie AU -4253+14719 Australia/Hobart Tasmania - most locations AU -3956+14352 Australia/Currie Tasmania - King Island AU -3749+14458 Australia/Melbourne Victoria @@ -135,8 +135,8 @@ CC -1210+09655 Indian/Cocos CH,DE,LI +4723+00832 Europe/Zurich Swiss Time CI,BF,GM,GN,ML,MR,SH,SL,SN,ST,TG +0519-00402 Africa/Abidjan CK -2114-15946 Pacific/Rarotonga -CL -3327-07040 America/Santiago Chile - most locations -CL -2709-10926 Pacific/Easter Easter Island +CL -3327-07040 America/Santiago +CL -2709-10926 Pacific/Easter CN +3114+12128 Asia/Shanghai Beijing Time CN +4348+08735 Asia/Urumqi Xinjiang Time CO +0436-07405 America/Bogota @@ -151,14 +151,14 @@ DE +5230+01322 Europe/Berlin Germany - most locations DK +5540+01235 Europe/Copenhagen DO +1828-06954 America/Santo_Domingo DZ +3647+00303 Africa/Algiers -EC -0210-07950 America/Guayaquil mainland -EC -0054-08936 Pacific/Galapagos Galápagos Islands +EC -0210-07950 America/Guayaquil +EC -0054-08936 Pacific/Galapagos EE +5925+02445 Europe/Tallinn EG +3003+03115 Africa/Cairo EH +2709-01312 Africa/El_Aaiun -ES +4024-00341 Europe/Madrid mainland -ES +3553-00519 Africa/Ceuta Ceuta & Melilla -ES +2806-01524 Atlantic/Canary Canary Islands +ES +4024-00341 Europe/Madrid +ES +3553-00519 Africa/Ceuta +ES +2806-01524 Atlantic/Canary FI,AX +6010+02458 Europe/Helsinki FJ -1808+17825 Pacific/Fiji FK -5142-05751 Atlantic/Stanley @@ -276,7 +276,7 @@ PN -2504-13005 Pacific/Pitcairn PR +182806-0660622 America/Puerto_Rico PS +3130+03428 Asia/Gaza Gaza Strip PS +313200+0350542 Asia/Hebron West Bank -PT +3843-00908 Europe/Lisbon mainland +PT +3843-00908 Europe/Lisbon PT +3238-01654 Atlantic/Madeira Madeira Islands PT +3744-02540 Atlantic/Azores Azores PW +0720+13429 Pacific/Palau
participants (2)
-
J William Piggott -
Paul Eggert