[tz] Time zone selection

Arthur David Olson arthurdavidolson at gmail.com
Fri Apr 22 00:20:55 UTC 2016

> I'm somewhat inclined to add one more hand-maintained table, zone-now.tab,
> which is like zone-1970.tab except using a cutoff of "now"...

Since time zone version 2 files end with POSIX-style strings, it may be
possible to automate the generation of zone-now.tab from zone-1970.tab:
    slurp the lines of zone-1970.tab
    for each line describes a zone, get the associated POSIX-style string
    output each zone-1970.tab line, except for the second and subsequent
lines associated with a particular POSIX-style string.

This would undoubtedly lead to some unwanted mergers, so an exception
mechanism (presumably in the form of magic zone-1970.tab comments) would be

As a start, here's a script that runs through a time zone binary directory
and tells which files are associated with which POSIX-style strings:


if ($#ARGV != 0) {
    die("$0: usage is $0 dir");

$dir = $ARGV[0];

chdir ($dir) || die("cannot chdir $dir");

for (`find * -type f`) {
    $zone = $_;
    open(S, "<$_") || next;
    if (<S> =~ /^TZif2/) {
        $last = "";
        while (<S>) {
            $posix = $_;
        $posix =~ s@[\r\n]@@;
        if ($zones{$posix} ne "") {
            $zones{$posix} .= " ";
        $zones{$posix} .= $zone;

for $posix (sort keys %zones) {
    print "\"$posix\"\t$counts{$posix}\t$zones{$posix}\r\n";

Below find the resullts of the above applied to a recent time zone binary


"<+04>-4"    2    Europe/Astrakhan Europe/Ulyanovsk
"<+07>-7"    1    Asia/Barnaul
"<GMT+10>10"    1    Etc/GMT+10
"<GMT+11>11"    1    Etc/GMT+11
"<GMT+12>12"    1    Etc/GMT+12
"<GMT+1>1"    1    Etc/GMT+1
"<GMT+2>2"    1    Etc/GMT+2
"<GMT+3>3"    1    Etc/GMT+3
"<GMT+4>4"    1    Etc/GMT+4
"<GMT+5>5"    1    Etc/GMT+5
"<GMT+6>6"    1    Etc/GMT+6
"<GMT+7>7"    1    Etc/GMT+7
"<GMT+8>8"    1    Etc/GMT+8
"<GMT+9>9"    1    Etc/GMT+9
"<GMT-10>-10"    1    Etc/GMT-10
"<GMT-11>-11"    1    Etc/GMT-11
"<GMT-12>-12"    1    Etc/GMT-12
"<GMT-13>-13"    1    Etc/GMT-13
"<GMT-14>-14"    1    Etc/GMT-14
"<GMT-1>-1"    1    Etc/GMT-1
"<GMT-2>-2"    1    Etc/GMT-2
"<GMT-3>-3"    1    Etc/GMT-3
"<GMT-4>-4"    1    Etc/GMT-4
"<GMT-5>-5"    1    Etc/GMT-5
"<GMT-6>-6"    1    Etc/GMT-6
"<GMT-7>-7"    1    Etc/GMT-7
"<GMT-8>-8"    1    Etc/GMT-8
"<GMT-9>-9"    1    Etc/GMT-9
"<Local time zone must be set--see zic manual page>0"    1    Factory
"ACST-9:30"    2    Australia/Darwin Australia/North
"ACST-9:30ACDT,M10.1.0,M4.1.0/3"    4    Australia/Adelaide
Australia/Broken_Hill Australia/South Australia/Yancowinna
"ACT5"    4    America/Eirunepe America/Porto_Acre America/Rio_Branco
"ACWST-8:45"    1    Australia/Eucla
"AEST-10"    3    Australia/Brisbane Australia/Lindeman Australia/Queensland
"AEST-10AEDT,M10.1.0,M4.1.0/3"    9    Australia/ACT Australia/Canberra
Australia/Currie Australia/Hobart Australia/Melbourne Australia/NSW
Australia/Sydney Australia/Tasmania Australia/Victoria
"AFT-4:30"    1    Asia/Kabul
"AKST9AKDT,M3.2.0,M11.1.0"    7    America/Anchorage America/Juneau
America/Metlakatla America/Nome America/Sitka America/Yakutat US/Alaska
"ALMT-6"    1    Asia/Almaty
"AMT-4"    1    Asia/Yerevan
"AMT4"    4    America/Boa_Vista America/Manaus America/Porto_Velho
"AMT4AMST,M10.3.0/0,M2.3.0/0"    2    America/Campo_Grande America/Cuiaba
"ANAT-12"    1    Asia/Anadyr
"AQTT-5"    2    Asia/Aqtau Asia/Aqtobe
"ART3"    19    America/Argentina/Buenos_Aires America/Argentina/Catamarca
America/Argentina/ComodRivadavia America/Argentina/Cordoba
America/Argentina/Jujuy America/Argentina/La_Rioja
America/Argentina/Mendoza America/Argentina/Rio_Gallegos
America/Argentina/Salta America/Argentina/San_Juan
America/Argentina/San_Luis America/Argentina/Tucuman
America/Argentina/Ushuaia America/Buenos_Aires America/Catamarca
America/Cordoba America/Jujuy America/Mendoza America/Rosario
"AST-3"    6    Asia/Aden Asia/Baghdad Asia/Bahrain Asia/Kuwait Asia/Qatar
"AST4"    25    America/Anguilla America/Antigua America/Aruba
America/Barbados America/Blanc-Sablon America/Curacao America/Dominica
America/Grand_Turk America/Grenada America/Guadeloupe America/Kralendijk
America/Lower_Princes America/Marigot America/Martinique America/Montserrat
America/Port_of_Spain America/Puerto_Rico America/Santo_Domingo
America/St_Barthelemy America/St_Kitts America/St_Lucia America/St_Thomas
America/St_Vincent America/Tortola America/Virgin
"AST4ADT,M3.2.0,M11.1.0"    7    America/Glace_Bay America/Goose_Bay
America/Halifax America/Moncton America/Thule Atlantic/Bermuda
"AWST-8"    3    Antarctica/Casey Australia/Perth Australia/West
"AZOT1AZOST,M3.5.0/0,M10.5.0/1"    1    Atlantic/Azores
"AZT-4AZST,M3.5.0/4,M10.5.0/5"    1    Asia/Baku
"BDT-6"    2    Asia/Dacca Asia/Dhaka
"BNT-8"    1    Asia/Brunei
"BOT4"    1    America/La_Paz
"BRT3"    7    America/Araguaina America/Bahia America/Belem
America/Fortaleza America/Maceio America/Recife America/Santarem
"BRT3BRST,M10.3.0/0,M2.3.0/0"    2    America/Sao_Paulo Brazil/East
"BST-11"    1    Pacific/Bougainville
"BTT-6"    2    Asia/Thimbu Asia/Thimphu
"CAT-2"    8    Africa/Blantyre Africa/Bujumbura Africa/Gaborone
Africa/Harare Africa/Kigali Africa/Lubumbashi Africa/Lusaka Africa/Maputo
"CCT-6:30"    1    Indian/Cocos
"CET-1"    2    Africa/Algiers Africa/Tunis
"CET-1CEST,M3.5.0,M10.5.0/3"    36    Africa/Ceuta Arctic/Longyearbyen
Atlantic/Jan_Mayen CET Europe/Amsterdam Europe/Andorra Europe/Belgrade
Europe/Berlin Europe/Bratislava Europe/Brussels Europe/Budapest
Europe/Busingen Europe/Copenhagen Europe/Gibraltar Europe/Ljubljana
Europe/Luxembourg Europe/Madrid Europe/Malta Europe/Monaco Europe/Oslo
Europe/Paris Europe/Podgorica Europe/Prague Europe/Rome Europe/San_Marino
Europe/Sarajevo Europe/Skopje Europe/Stockholm Europe/Tirane Europe/Vaduz
Europe/Vatican Europe/Vienna Europe/Warsaw Europe/Zagreb Europe/Zurich
"CHAST-12:45CHADT,M9.5.0/2:45,M4.1.0/3:45"    2    NZ-CHAT Pacific/Chatham
"CHOT-8CHOST,M3.5.6,M9.5.6/0"    1    Asia/Choibalsan
"CHUT-10"    3    Pacific/Chuuk Pacific/Truk Pacific/Yap
"CKT10"    1    Pacific/Rarotonga
"CLT3"    3    America/Santiago Antarctica/Palmer Chile/Continental
"COT5"    1    America/Bogota
"CST-8"    9    Asia/Chongqing Asia/Chungking Asia/Harbin Asia/Macao
Asia/Macau Asia/Shanghai Asia/Taipei PRC ROC
"CST5CDT,M3.2.0/0,M11.1.0/1"    2    America/Havana Cuba
"CST6"    10    America/Belize America/Costa_Rica America/El_Salvador
America/Guatemala America/Managua America/Regina America/Swift_Current
America/Tegucigalpa Canada/East-Saskatchewan Canada/Saskatchewan
"CST6CDT,M3.2.0,M11.1.0"    17    America/Chicago America/Indiana/Knox
America/Indiana/Tell_City America/Knox_IN America/Matamoros
America/Menominee America/North_Dakota/Beulah America/North_Dakota/Center
America/North_Dakota/New_Salem America/Rainy_River America/Rankin_Inlet
America/Resolute America/Winnipeg Canada/Central CST6CDT US/Central
"CST6CDT,M4.1.0,M10.5.0"    5    America/Bahia_Banderas America/Merida
America/Mexico_City America/Monterrey Mexico/General
"CVT1"    1    Atlantic/Cape_Verde
"CXT-7"    1    Indian/Christmas
"ChST-10"    2    Pacific/Guam Pacific/Saipan
"DAVT-7"    1    Antarctica/Davis
"DDUT-10"    1    Antarctica/DumontDUrville
"EAST5"    2    Chile/EasterIsland Pacific/Easter
"EAT-3"    13    Africa/Addis_Ababa Africa/Asmara Africa/Asmera
Africa/Dar_es_Salaam Africa/Djibouti Africa/Juba Africa/Kampala
Africa/Khartoum Africa/Mogadishu Africa/Nairobi Indian/Antananarivo
Indian/Comoro Indian/Mayotte
"ECT5"    1    America/Guayaquil
"EET-2"    5    Africa/Cairo Africa/Tripoli Egypt Europe/Kaliningrad Libya
"EET-2EEST,M3.5.0,M10.5.0/3"    2    Europe/Chisinau Europe/Tiraspol
"EET-2EEST,M3.5.0/0,M10.5.0/0"    1    Asia/Beirut
"EET-2EEST,M3.5.0/3,M10.5.0/4"    17    Asia/Istanbul Asia/Nicosia EET
Europe/Athens Europe/Bucharest Europe/Helsinki Europe/Istanbul Europe/Kiev
Europe/Mariehamn Europe/Nicosia Europe/Riga Europe/Sofia Europe/Tallinn
Europe/Uzhgorod Europe/Vilnius Europe/Zaporozhye Turkey
"EET-2EEST,M3.5.4/24,M10.5.5/1"    1    Asia/Amman
"EET-2EEST,M3.5.5/0,M10.5.5/0"    1    Asia/Damascus
"EGT1EGST,M3.5.0/0,M10.5.0/1"    1    America/Scoresbysund
"EST5"    8    America/Atikokan America/Cancun America/Cayman
America/Coral_Harbour America/Jamaica America/Panama EST Jamaica
"EST5EDT,M3.2.0,M11.1.0"    27    America/Detroit America/Fort_Wayne
America/Indiana/Indianapolis America/Indiana/Marengo
America/Indiana/Petersburg America/Indiana/Vevay America/Indiana/Vincennes
America/Indiana/Winamac America/Indianapolis America/Iqaluit
America/Kentucky/Louisville America/Kentucky/Monticello America/Louisville
America/Montreal America/Nassau America/New_York America/Nipigon
America/Pangnirtung America/Port-au-Prince America/Thunder_Bay
America/Toronto Canada/Eastern EST5EDT posixrules US/East-Indiana
US/Eastern US/Michigan
"FJT-12FJST,M11.1.0,M1.3.0/3"    1    Pacific/Fiji
"FKST3"    1    Atlantic/Stanley
"FNT2"    2    America/Noronha Brazil/DeNoronha
"GALT6"    1    Pacific/Galapagos
"GAMT9"    1    Pacific/Gambier
"GET-4"    1    Asia/Tbilisi
"GFT3"    1    America/Cayenne
"GILT-12"    1    Pacific/Tarawa
"GMT0"    29    Africa/Abidjan Africa/Accra Africa/Bamako Africa/Banjul
Africa/Bissau Africa/Conakry Africa/Dakar Africa/Freetown Africa/Lome
Africa/Monrovia Africa/Nouakchott Africa/Ouagadougou Africa/Sao_Tome
Africa/Timbuktu America/Danmarkshavn Atlantic/Reykjavik Atlantic/St_Helena
Etc/GMT Etc/GMT+0 Etc/GMT-0 Etc/GMT0 Etc/Greenwich GMT GMT+0 GMT0 GMT-0
Greenwich Iceland localtime
"GMT0BST,M3.5.0/1,M10.5.0"    7    Europe/Belfast Europe/Guernsey
Europe/Isle_of_Man Europe/Jersey Europe/London GB GB-Eire
"GMT0IST,M3.5.0/1,M10.5.0"    2    Eire Europe/Dublin
"GST-4"    2    Asia/Dubai Asia/Muscat
"GST2"    1    Atlantic/South_Georgia
"GYT4"    1    America/Guyana
"HKT-8"    2    Asia/Hong_Kong Hongkong
"HOVT-7HOVST,M3.5.6,M9.5.6/0"    1    Asia/Hovd
"HST10"    4    HST Pacific/Honolulu Pacific/Johnston US/Hawaii
"HST10HDT,M3.2.0,M11.1.0"    3    America/Adak America/Atka US/Aleutian
"ICT-7"    5    Asia/Bangkok Asia/Ho_Chi_Minh Asia/Phnom_Penh Asia/Saigon
"IOT-6"    1    Indian/Chagos
"IRKT-8"    1    Asia/Irkutsk
"IRST-3:30IRDT,J80/0,J264/0"    2    Asia/Tehran Iran
"IST-5:30"    3    Asia/Calcutta Asia/Colombo Asia/Kolkata
"JST-9"    2    Asia/Tokyo Japan
"KGT-6"    1    Asia/Bishkek
"KOST-11"    1    Pacific/Kosrae
"KRAT-7"    2    Asia/Krasnoyarsk Asia/Novokuznetsk
"KST-8:30"    1    Asia/Pyongyang
"KST-9"    2    Asia/Seoul ROK
"LHST-10:30LHDT-11,M10.1.0,M4.1.0"    2    Australia/LHI Australia/Lord_Howe
"LINT-14"    1    Pacific/Kiritimati
"MAGT-10"    1    Asia/Magadan
"MART9:30"    1    Pacific/Marquesas
"MAWT-5"    1    Antarctica/Mawson
"MET-1MEST,M3.5.0,M10.5.0/3"    1    MET
"MHT-12"    3    Kwajalein Pacific/Kwajalein Pacific/Majuro
"MIST-11"    1    Antarctica/Macquarie
"MMT-6:30"    1    Asia/Rangoon
"MSK-3"    5    Europe/Minsk Europe/Moscow Europe/Simferopol
Europe/Volgograd W-SU
"MST7"    7    America/Creston America/Dawson_Creek America/Fort_Nelson
America/Hermosillo America/Phoenix MST US/Arizona
"MST7MDT,M3.2.0,M11.1.0"    12    America/Boise America/Cambridge_Bay
America/Denver America/Edmonton America/Inuvik America/Ojinaga
America/Shiprock America/Yellowknife Canada/Mountain MST7MDT Navajo
"MST7MDT,M4.1.0,M10.5.0"    3    America/Chihuahua America/Mazatlan
"MUT-4"    1    Indian/Mauritius
"MVT-5"    1    Indian/Maldives
"MYT-8"    2    Asia/Kuala_Lumpur Asia/Kuching
"NCT-11"    1    Pacific/Noumea
"NFT-11"    1    Pacific/Norfolk
"NOVT-6"    1    Asia/Novosibirsk
"NPT-5:45"    2    Asia/Kathmandu Asia/Katmandu
"NRT-12"    1    Pacific/Nauru
"NST3:30NDT,M3.2.0,M11.1.0"    2    America/St_Johns Canada/Newfoundland
"NUT11"    1    Pacific/Niue
"NZST-12NZDT,M9.5.0,M4.1.0/3"    4    Antarctica/McMurdo
Antarctica/South_Pole NZ Pacific/Auckland
"OMST-6"    1    Asia/Omsk
"ORAT-5"    1    Asia/Oral
"PET5"    1    America/Lima
"PETT-12"    1    Asia/Kamchatka
"PGT-10"    1    Pacific/Port_Moresby
"PHOT-13"    1    Pacific/Enderbury
"PHT-8"    1    Asia/Manila
"PKT-5"    1    Asia/Karachi
"PMST3PMDT,M3.2.0,M11.1.0"    1    America/Miquelon
"PONT-11"    2    Pacific/Pohnpei Pacific/Ponape
"PST8"    1    Pacific/Pitcairn
"PST8PDT,M3.2.0,M11.1.0"    13    America/Dawson America/Ensenada
America/Los_Angeles America/Santa_Isabel America/Tijuana America/Vancouver
America/Whitehorse Canada/Pacific Canada/Yukon Mexico/BajaNorte PST8PDT
US/Pacific US/Pacific-New
"PWT-9"    1    Pacific/Palau
"PYT4PYST,M10.1.0/0,M3.4.0/0"    1    America/Asuncion
"QYZT-6"    1    Asia/Qyzylorda
"RET-4"    1    Indian/Reunion
"ROTT3"    1    Antarctica/Rothera
"SAKT-11"    1    Asia/Sakhalin
"SAMT-4"    1    Europe/Samara
"SAST-2"    3    Africa/Johannesburg Africa/Maseru Africa/Mbabane
"SBT-11"    1    Pacific/Guadalcanal
"SCT-4"    1    Indian/Mahe
"SGT-8"    2    Asia/Singapore Singapore
"SRET-11"    1    Asia/Srednekolymsk
"SRT3"    1    America/Paramaribo
"SST11"    4    Pacific/Midway Pacific/Pago_Pago Pacific/Samoa US/Samoa
"SYOT-3"    1    Antarctica/Syowa
"TAHT10"    1    Pacific/Tahiti
"TFT-5"    1    Indian/Kerguelen
"TJT-5"    1    Asia/Dushanbe
"TKT-13"    1    Pacific/Fakaofo
"TLT-9"    1    Asia/Dili
"TMT-5"    2    Asia/Ashgabat Asia/Ashkhabad
"TOT-13"    1    Pacific/Tongatapu
"TVT-12"    1    Pacific/Funafuti
"UCT0"    2    Etc/UCT UCT
"ULAT-8ULAST,M3.5.6,M9.5.6/0"    2    Asia/Ulaanbaatar Asia/Ulan_Bator
"UTC0"    6    Etc/Universal Etc/UTC Etc/Zulu Universal UTC Zulu
"UTC0CEST-2,M3.5.0/1,M10.5.0/3"    1    Antarctica/Troll
"UYT3"    1    America/Montevideo
"UZT-5"    2    Asia/Samarkand Asia/Tashkent
"VET4:30"    1    America/Caracas
"VLAT-10"    2    Asia/Ust-Nera Asia/Vladivostok
"VOST-6"    1    Antarctica/Vostok
"VUT-11"    1    Pacific/Efate
"WAKT-12"    1    Pacific/Wake
"WAT-1"    11    Africa/Bangui Africa/Brazzaville Africa/Douala
Africa/Kinshasa Africa/Lagos Africa/Libreville Africa/Luanda Africa/Malabo
Africa/Ndjamena Africa/Niamey Africa/Porto-Novo
"WAT-1WAST,M9.1.0,M4.1.0"    1    Africa/Windhoek
"WET0WEST,M3.5.0,M10.5.0/3"    2    Africa/Casablanca Africa/El_Aaiun
"WET0WEST,M3.5.0/1,M10.5.0"    7    Atlantic/Canary Atlantic/Faeroe
Atlantic/Faroe Atlantic/Madeira Europe/Lisbon Portugal WET
"WFT-12"    1    Pacific/Wallis
"WIB-7"    2    Asia/Jakarta Asia/Pontianak
"WIT-9"    1    Asia/Jayapura
"WITA-8"    2    Asia/Makassar Asia/Ujung_Pandang
"WSST-13WSDT,M9.5.0/3,M4.1.0/4"    1    Pacific/Apia
"XJT-6"    2    Asia/Kashgar Asia/Urumqi
"YAKT-9"    3    Asia/Chita Asia/Khandyga Asia/Yakutsk
"YEKT-5"    1    Asia/Yekaterinburg

On Mon, Apr 18, 2016 at 12:52 PM, Paul Eggert <eggert at cs.ucla.edu> wrote:

> On 04/18/2016 09:04 AM, Matt Johnson wrote:
>> To my knowledge, there is no project that maintains localized
>> translations for comments in zone.tab. Not even CLDR.
> I don't know of any either. Perhaps CLDR could take this on too?
> I've computed a "threshold date" for each zone, where the zones are
>> identical from the threshold date forward. That date can be set by the
>> developer of the application to limit the subset of zones to choose from
>> without imposing too much opinion. I'm curious if anyone else has explored
>> this space before, or used similar techniques?
> I did something along those lines, but gave up on it as being too hard to
> automate well. For example, if the threshold is 2001-01-01 00:00:00 UTC,
> then we should merge America/Boise, America/Denver, America/Edmonton, and
> America/Yellowknife. How does the automated procedure choose the ID of the
> merged region? It should be America/Denver, as that has the greatest
> population, but how is the population recorded and what happens as
> population changes? Furthermore, how does the automated procedure derive
> the comment for the merged region?  And how would CLDR translate this
> automatically-derived comment?
> For this reason I'm somewhat inclined to add one more hand-maintained
> table, zone-now.tab, which is like zone-1970.tab except using a cutoff of
> "now" (a deliberatly moving target) instead of a cutoff of 1970. That
> should be good enough for applications that don't need historical time
> stamps, and will be easier to automate and CLDRize.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20160421/bd3958a2/attachment-0001.html>

More information about the tz mailing list