pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Prefer timezone name "UTC" over alternative spellings. 6+ messages / 1 participants [nested] [flat]
* pgsql: Prefer timezone name "UTC" over alternative spellings. @ 2019-06-15 17:46 Andrew Gierth <rhodiumtoad@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Andrew Gierth @ 2019-06-15 17:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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. Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/5f5b6667ebf3ab24327ecb275167709d8d70cece Modified Files -------------- src/bin/initdb/findtimezone.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Prefer timezone name "UTC" over alternative spellings. @ 2019-06-15 17:46 Andrew Gierth <rhodiumtoad@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Andrew Gierth @ 2019-06-15 17:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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. Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/e3846a00c2f87402dcedf7f07950ab2d89cf5827 Modified Files -------------- src/bin/initdb/findtimezone.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Prefer timezone name "UTC" over alternative spellings. @ 2019-06-15 17:46 Andrew Gierth <rhodiumtoad@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Andrew Gierth @ 2019-06-15 17:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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. Branch ------ REL9_4_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6c66865f3c58d0d340aa163c9689ae3a126d4e78 Modified Files -------------- src/bin/initdb/findtimezone.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Prefer timezone name "UTC" over alternative spellings. @ 2019-06-15 17:46 Andrew Gierth <rhodiumtoad@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Andrew Gierth @ 2019-06-15 17:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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. Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/7f28fc8e929e9c63a489de4a359464d700025930 Modified Files -------------- src/bin/initdb/findtimezone.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Prefer timezone name "UTC" over alternative spellings. @ 2019-06-15 17:46 Andrew Gierth <rhodiumtoad@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Andrew Gierth @ 2019-06-15 17:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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. Branch ------ REL9_5_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/6335f8a999d846e5d60c9f463601b6fe80dfef34 Modified Files -------------- src/bin/initdb/findtimezone.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Prefer timezone name "UTC" over alternative spellings. @ 2019-06-15 17:46 Andrew Gierth <rhodiumtoad@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Andrew Gierth @ 2019-06-15 17:46 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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. Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2913a892e1b21a4079f334c52c71704b828f73d8 Modified Files -------------- src/bin/initdb/findtimezone.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2019-06-15 17:46 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-06-15 17:46 pgsql: Prefer timezone name "UTC" over alternative spellings. Andrew Gierth <rhodiumtoad@postgresql.org> 2019-06-15 17:46 pgsql: Prefer timezone name "UTC" over alternative spellings. Andrew Gierth <rhodiumtoad@postgresql.org> 2019-06-15 17:46 pgsql: Prefer timezone name "UTC" over alternative spellings. Andrew Gierth <rhodiumtoad@postgresql.org> 2019-06-15 17:46 pgsql: Prefer timezone name "UTC" over alternative spellings. Andrew Gierth <rhodiumtoad@postgresql.org> 2019-06-15 17:46 pgsql: Prefer timezone name "UTC" over alternative spellings. Andrew Gierth <rhodiumtoad@postgresql.org> 2019-06-15 17:46 pgsql: Prefer timezone name "UTC" over alternative spellings. Andrew Gierth <rhodiumtoad@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox