Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)

Andrew Gierth <andrew@tao11.riddles.org.uk>

From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>, Stephen Frost <sfrost@snowman.net>, Andres Freund <andres@anarazel.de>, Christoph Berg <myon@debian.org>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-06-26T06:32:29Z
Lists: pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 Tom> TBH, I find this borderline insane: it's taking a problem we did
 Tom> not have and moving the goalposts to the next county. Not just any
 Tom> old county, either, but one where there's a shooting war going on.

 Tom> As soon as you do something like putting detailed preferences into
 Tom> the zone name selection rules, you are going to be up against
 Tom> problems like "should Europe/ have priority over Asia/, or vice
 Tom> versa?"

I would say that this problem exists with arbitrary preferences too.

 Tom> As long as we have a trivial and obviously apolitical rule like
 Tom> alphabetical order, I think we can skate over such things; but the
 Tom> minute we have any sort of human choices involved there, we're
 Tom> going to be getting politically driven requests to
 Tom> do-it-like-this-because-I-think- the-default-should-be-that.

The actual content of the rules I suggested all come from the tzdb
distribution; anyone complaining can be told to take it up with them.

For the record, this is the list of zones (91 out of 348, or about 26%)
that we currently deduce wrongly, as obtained by trying each zone name
listed in zone1970.tab and seeing which zone we deduce when that zone's
file is copied to /etc/localtime. Note in particular that our arbitrary
rules heavily prefer the deprecated backward-compatibility aliases which
are the most likely to disappear in future versions.

(not all of these are fixable, of course)

Africa/Abidjan -> GMT
Africa/Cairo -> Egypt
Africa/Johannesburg -> Africa/Maseru
Africa/Maputo -> Africa/Harare
Africa/Nairobi -> Africa/Asmara
Africa/Tripoli -> Libya
America/Adak -> US/Aleutian
America/Anchorage -> US/Alaska
America/Argentina/Buenos_Aires -> America/Buenos_Aires
America/Argentina/Catamarca -> America/Catamarca
America/Argentina/Cordoba -> America/Cordoba
America/Argentina/Jujuy -> America/Jujuy
America/Argentina/Mendoza -> America/Mendoza
America/Argentina/Rio_Gallegos -> America/Argentina/Ushuaia
America/Chicago -> US/Central
America/Creston -> MST
America/Curacao -> America/Aruba
America/Denver -> Navajo
America/Detroit -> US/Michigan
America/Edmonton -> Canada/Mountain
America/Havana -> Cuba
America/Indiana/Indianapolis -> US/East-Indiana
America/Indiana/Knox -> America/Knox_IN
America/Jamaica -> Jamaica
America/Kentucky/Louisville -> America/Louisville
America/Los_Angeles -> US/Pacific
America/Manaus -> Brazil/West
America/Mazatlan -> Mexico/BajaSur
America/Mexico_City -> Mexico/General
America/New_York -> US/Eastern
America/Panama -> EST
America/Phoenix -> US/Arizona
America/Port_of_Spain -> America/Virgin
America/Rio_Branco -> Brazil/Acre
America/Sao_Paulo -> Brazil/East
America/Toronto -> Canada/Eastern
America/Vancouver -> Canada/Pacific
America/Whitehorse -> Canada/Yukon
America/Winnipeg -> Canada/Central
Asia/Dhaka -> Asia/Dacca
Asia/Ho_Chi_Minh -> Asia/Saigon
Asia/Hong_Kong -> Hongkong
Asia/Jerusalem -> Israel
Asia/Kathmandu -> Asia/Katmandu
Asia/Kuala_Lumpur -> Singapore
Asia/Macau -> Asia/Macao
Asia/Riyadh -> Asia/Aden
Asia/Seoul -> ROK
Asia/Shanghai -> PRC
Asia/Singapore -> Singapore
Asia/Taipei -> ROC
Asia/Tehran -> Iran
Asia/Thimphu -> Asia/Thimbu
Asia/Tokyo -> Japan
Asia/Ulaanbaatar -> Asia/Ulan_Bator
Atlantic/Reykjavik -> Iceland
Atlantic/South_Georgia -> Etc/GMT+2
Australia/Adelaide -> Australia/South
Australia/Broken_Hill -> Australia/Yancowinna
Australia/Darwin -> Australia/North
Australia/Lord_Howe -> Australia/LHI
Australia/Melbourne -> Australia/Victoria
Australia/Perth -> Australia/West
Australia/Sydney -> Australia/ACT
Europe/Belgrade -> Europe/Skopje
Europe/Dublin -> Eire
Europe/Istanbul -> Turkey
Europe/Lisbon -> Portugal
Europe/London -> GB
Europe/Moscow -> W-SU
Europe/Warsaw -> Poland
Europe/Zurich -> Europe/Vaduz
Indian/Christmas -> Etc/GMT-7
Indian/Mahe -> Etc/GMT-4
Indian/Reunion -> Etc/GMT-4
Pacific/Auckland -> NZ
Pacific/Chatham -> NZ-CHAT
Pacific/Chuuk -> Pacific/Yap
Pacific/Funafuti -> Etc/GMT-12
Pacific/Gambier -> Etc/GMT+9
Pacific/Guadalcanal -> Etc/GMT-11
Pacific/Honolulu -> US/Hawaii
Pacific/Kwajalein -> Kwajalein
Pacific/Pago_Pago -> US/Samoa
Pacific/Palau -> Etc/GMT-9
Pacific/Pohnpei -> Pacific/Ponape
Pacific/Port_Moresby -> Etc/GMT-10
Pacific/Tahiti -> Etc/GMT+10
Pacific/Tarawa -> Etc/GMT-12
Pacific/Wake -> Etc/GMT-12
Pacific/Wallis -> Etc/GMT-12

-- 
Andrew (irc:RhodiumToad)



Commits

  1. Tweak our special-case logic for the IANA "Factory" timezone.

  2. Avoid choosing "localtime" or "posixrules" as TimeZone during initdb.

  3. Prefer timezone name "UTC" over alternative spellings.

  4. Attempt to identify system timezone by reading /etc/localtime symlink.

  5. Update time zone data files to tzdata release 2019a.