[tz] [PATCH] New file time.tab, superseding zone.tab

Paul Eggert eggert at cs.ucla.edu
Sat Jul 19 22:46:39 UTC 2014


Matt Johnson wrote:
>   Someone living there would have previously selected Germany, then Busingen.  But now they have to select Germany, then Zurich.

Actually, after selecting Germany tzselect now asks you this:

Please select one of the following time zone regions.
1) Swiss time
2) Berlin time

> people living elsewhere in Germany might get confused as to why Zurich is a choice at all

Without the change, many people in Germany might have gotten confused as 
to why Busingen is a choice at all, so the change isn't making things 
worse.  On the contrary, to my mind "Swiss time" is a bit of an 
improvement, as it makes it clearer what's going on to someone who's not 
a time zone expert.  Perhaps the wording could be improved further, but 
the old wording wasn't all that great either.

> Should one infer that the intent here is to reduce the usage of links?

Yes, one of the motivations was to not have to maintain 
seemingly-separate entries for what are really aliases.  The new file 
time.tab doesn't have any links; this should have been checked by "make 
check_tables" but I see there was a typo in its implementation, so I 
installed the attached patch into the experimental version to fix that.
-------------- next part --------------
From f1076349535b24cd3570575e2874e494163080a4 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert at cs.ucla.edu>
Date: Sat, 19 Jul 2014 15:44:39 -0700
Subject: [PATCH] * checktab.awk: Fix typo that prevented catching inks in
 'time.tab'.

Also, hoist some code out of a loop.
---
 checktab.awk | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/checktab.awk b/checktab.awk
index ac40954..94354d7 100644
--- a/checktab.awk
+++ b/checktab.awk
@@ -72,13 +72,13 @@ BEGIN {
 			status = 1
 		}
 		cc0 = cc
+		tztab[tz] = 1
+		tz2comments[tz] = comments
+		tz2NR[tz] = zone_NR
 		for (i in cca) {
 		    cc = cca[i]
 		    cctz = cc tz
 		    cctztab[cctz] = 1
-		    tztab[tz] = 1
-		    tz2comments[tz] = comments
-		    tz2NR[tz] = zone_NR
 		    if (cc2name[cc]) {
 			cc_used[cc]++
 		    } else {
@@ -158,14 +158,13 @@ END {
 			status = 1
 		}
 	}
-	for (tz in tz2cc) {
+	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) {
 			if (!cc_used[cc]) {
-- 
1.9.1



More information about the tz mailing list