postgresql/src/bin
Andrew Gierth 5f5b6667eb Prefer timezone name "UTC" over alternative spellings.
tzdb 2019a made "UCT" a link to the "UTC" zone rather than a separate
zone with its own abbreviation. Unfortunately, our code for choosing a
timezone in initdb has an arbitrary preference for names earlier in
the alphabet, and so it would choose the spelling "UCT" over "UTC"
when the system is running on a UTC zone.

Commit 23bd3cec6 was backpatched in order to address this issue, but
that code helps only when /etc/localtime exists as a symlink, and does
nothing to help on systems where /etc/localtime is a copy of a zone
file (as is the standard setup on FreeBSD and probably some other
platforms too) or when /etc/localtime is simply absent (giving UTC as
the default).

Accordingly, add a preference for the spelling "UTC", such that if
multiple zone names have equally good content matches, we prefer that
name before applying the existing arbitrary rules. Also add a slightly
lower preference for "Etc/UTC"; lower because that preserves the
previous behaviour of choosing the shorter name, but letting us still
choose "Etc/UTC" over "Etc/UCT" when both exist but "UTC" does
not (not common, but I've seen it happen).

Backpatch all the way, because the tzdb change that sparked this issue
is in those branches too.
2019-06-15 18:19:30 +01:00
..
initdb Prefer timezone name "UTC" over alternative spellings. 2019-06-15 18:19:30 +01:00
pg_archivecleanup Fix new warnings from GCC 7 2017-05-16 08:52:39 -04:00
pg_basebackup Translation updates 2019-05-06 14:49:30 +02:00
pg_config Translation updates 2019-05-06 14:49:30 +02:00
pg_controldata Translation updates 2019-05-06 14:49:30 +02:00
pg_ctl Honor TEMP_CONFIG in TAP suites. 2019-05-11 00:24:41 -07:00
pg_dump Fix ordering of GRANT commands in pg_dumpall for tablespaces 2019-05-23 10:48:35 +09:00
pg_resetxlog Translation updates 2019-05-06 14:49:30 +02:00
pg_rewind Translation updates 2019-05-06 14:49:30 +02:00
pg_test_fsync Avoid depending on non-POSIX behavior of fcntl(2). 2017-04-21 15:55:56 -04:00
pg_test_timing Move pg_test_timing from contrib/ to src/bin/ 2015-04-20 21:30:12 -04:00
pg_upgrade In the pg_upgrade test suite, don't write to src/test/regress. 2019-05-28 13:00:21 -07:00
pg_xlogdump Use snprintf not sprintf in pg_waldump's timestamptz_to_str. 2018-06-16 14:45:47 -04:00
pgbench Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-07-09 17:23:31 -04:00
pgevent Update copyright for 2016 2016-01-02 13:33:40 -05:00
psql Translation updates 2019-05-06 14:49:30 +02:00
scripts Fix error reporting in reindexdb 2019-05-11 13:01:19 +09:00
Makefile Update copyright for 2016 2016-01-02 13:33:40 -05:00