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: Christoph Berg <myon@debian.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-06-04T10:20:14Z
Lists: pgsql-hackers
>>>>> "Christoph" == Christoph Berg <myon@debian.org> writes: >> Etc/UCT is now a backward-compatibility link to Etc/UTC, instead of >> being a separate zone that generates the abbreviation "UCT", which >> nowadays is typically a typo. Postgres will still accept "UCT" as an >> input zone name, but it won't output it. Christoph> There is something wrong here. On Debian Buster/unstable, Christoph> using system tzdata (2019a-1), if /etc/timezone is Christoph> "Etc/UTC": Christoph> 11.3's initdb adds timezone = 'UCT' to postgresql.conf Christoph> 12beta1's initdb add timezone = 'Etc/UCT' to postgresql.conf Christoph> Is that expected behavior? It's clearly not what users expect and it's clearly the wrong thing to do, though it's the expected behavior of the current code: * On most systems, we rely on trying to match the observable behavior of * the C library's localtime() function. The database zone that matches * furthest into the past is the one to use. Often there will be several * zones with identical rankings (since the IANA database assigns multiple * names to many zones). We break ties arbitrarily by preferring shorter, * then alphabetically earlier zone names. I believe I pointed out a long, long time ago that this tie-breaking strategy was insane, and that the rule should be to prefer canonical names and use something else only in the case of a strictly better match. If TZ is set or if /etc/localtime is a symlink rather than a hardlink or copy of the zone file, then PG can get the zone name directly rather than having to do the comparisons, so the above comment doesn't apply; that gives you a workaround. -- Andrew (irc:RhodiumToad)
Commits
-
Tweak our special-case logic for the IANA "Factory" timezone.
- f6c7c64e9fc8 9.6.15 landed
- f227aecb9af7 9.5.19 landed
- e49132e633b5 9.4.24 landed
- d304313b071a 11.5 landed
- d095b2fe676a 12.0 landed
- 8ab66081ca49 13.0 landed
- 55862b2e9303 10.10 landed
-
Avoid choosing "localtime" or "posixrules" as TimeZone during initdb.
- 6c4ffab76320 9.4.24 landed
- 9ef8117420d4 9.5.19 landed
- 51b47471f0f6 9.6.15 landed
- ae9b91be79ea 10.10 landed
- 4459266bf0d3 11.5 landed
- e31dfe99c8c6 12.0 landed
- 3754113f3365 13.0 landed
-
Prefer timezone name "UTC" over alternative spellings.
- e3846a00c2f8 12.0 cited
-
Attempt to identify system timezone by reading /etc/localtime symlink.
- 995b4fe0b14f 11.4 landed
- 8de574aa8bf7 10.9 landed
- 77dc741a1727 9.5.18 landed
- 75b0f21e1b19 9.6.14 landed
- 37011bcb30a9 9.4.23 landed
-
Update time zone data files to tzdata release 2019a.
- f6307bacabf5 11.3 cited