[tz] [PATCH 2/5] tzselect.ksh: regions list to inclusive
J William Piggott
elseifthen at gmx.com
Wed Jan 20 16:37:22 UTC 2016
The regions list criteria was only based on
country. This caused, for example, all of
Australia to be listed under the regions for
Antarctica > Australia.
This commit requires both country and continent to
match for a region selection.
Signed-off-by: J William Piggott <elseifthen at gmx.com>
---
tzselect.ksh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tzselect.ksh b/tzselect.ksh
index 10570b6..e9cc4c7 100644
--- a/tzselect.ksh
+++ b/tzselect.ksh
@@ -440,6 +440,7 @@ while
# Get list of names of time zone rule regions in the country.
regions=`$AWK \
-v country="$country" \
+ -v continent="$continent" \
-v TZ_COUNTRY_TABLE="$TZ_COUNTRY_TABLE" \
'
BEGIN {
@@ -453,7 +454,7 @@ while
}
}
/^#/ { next }
- $1 ~ cc { print $4 }
+ $1 ~ cc && $3 ~ ("^" continent "/"){ print $4 }
' <"$TZ_ZONE_TABLE"`
More information about the tz
mailing list