From 7d9279a766a783a00ab80afefb842f75356991bb Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 11 May 2015 21:50:27 -0700 Subject: [PATCH] tzselect: discard comments properly The country code 'DM' matched data in the leading comments in zone1970.tab, which caused tzselect to misbehave. Problem reported by Owen Leibman in: http://mm.icann.org/pipermail/tz/2015-May/022265.html * tzselect.ksh (regions, TZ): Don't treat comments as data. * NEWS: Mention this. --- NEWS | 3 +++ tzselect.ksh | 2 ++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index fc7773d..392f09b 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,9 @@ Unreleased, experimental changes When displaying data, tzselect converts it to the current locale's encoding if the iconv command works. (Problem reported by random832.) + tzselect no longer mishandles Dominica, fixing a bug introduced + in Release 2014f. (Problem reported by Owen Leibman.) + Release 2015d - 2015-04-24 08:09:46 -0700 diff --git a/tzselect.ksh b/tzselect.ksh index 0d46ed7..2a622f5 100644 --- a/tzselect.ksh +++ b/tzselect.ksh @@ -449,6 +449,7 @@ while } } } + /^#/ { next } $1 ~ cc { print $4 } ' <"$TZ_ZONE_TABLE"` @@ -480,6 +481,7 @@ while } } } + /^#/ { next } $1 ~ cc && $4 == region { print $3 } ' <"$TZ_ZONE_TABLE"` esac