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

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, Christoph Berg <myon(at)debian(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)
Date: 2019-06-19 23:59:29
Message-ID: 877e9h18df.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

Tom> So I'm toying with the idea of extending Andrew's patch to put a
Tom> negative preference on "localtime", ensuring we'll use some other
Tom> name for the zone if one is available.

Tom> Also, now that we have this mechanism, maybe we should charge it
Tom> with de-preferencing the old "Factory" zone, removing the
Tom> hard-wired kluge that we currently have for rejecting that.
Tom> (Modern tzdb doesn't install "Factory" at all, but some
Tom> installations might still do so in the service of blind backwards
Tom> compatibility.)

I was planning on submitting a follow-up myself (for pg13+) for
discussion of further improvements. My suggestion would be that we
should have the following order of preference, from highest to lowest:

- UTC (justified by being an international standard)

- Etc/UTC

- zones in zone.tab/zone1970.tab:

These are the zone names that are intended to be presented to the
user to select from. Dispute the exact meaning as you will, but I
think it makes sense that these names should be chosen over
equivalently good matches just on that basis.

- zones in Africa/ America/ Antarctica/ Asia/ Atlantic/ Australia/
Europe/ Indian/ Pacific/ Arctic/

These subdirs are the ones generated by the "primary" zone data
files, including both Zone and Link statements but not counting
the "backward" and "etcetera" files.

- GMT (justified on the basis of its presence as a default in the code)

- Etc/*

- any other zone name with a /

- any zone name without a /, excluding 'localtime' and 'Factory'

- 'localtime'

- 'Factory'

Choosing names with / over ones without is a change from our existing
preference for shorter names, but it's more robust in the face of the
various crap that gets dumped in the top level of the zoneinfo dir.
It could be argued that we should reverse the relative order of UTC vs.
Etc/UTC and likewise for GMT for the same reason, but I think that's
less important.

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Gierth 2019-06-20 00:50:37 Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)
Previous Message Tom Lane 2019-06-19 23:30:44 Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Gierth 2019-06-20 00:50:37 Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)
Previous Message Tom Lane 2019-06-19 23:30:44 Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.)