Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hdkUL-0006Lm-GC for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Jun 2019 23:59:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hdkUK-0007MC-4E for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Jun 2019 23:59:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hdkUJ-0007M5-RW for pgsql-hackers@lists.postgresql.org; Wed, 19 Jun 2019 23:59:35 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hdkUH-0002BG-Hc for pgsql-hackers@postgresql.org; Wed, 19 Jun 2019 23:59:35 +0000 Received: from [192.168.127.1] (port=32944 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1hdkUD-000HQL-QP; Wed, 19 Jun 2019 23:59:29 +0000 Received: from [127.0.0.1] (port=22783 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1hdkUD-000FIX-55; Wed, 19 Jun 2019 23:59:29 +0000 From: Andrew Gierth To: Tom Lane Cc: Robert Haas , Stephen Frost , Andres Freund , Christoph Berg , PostgreSQL Hackers Subject: Re: UCT (Re: pgsql: Update time zone data files to tzdata release 2019a.) In-Reply-To: <27991.1560984458@sss.pgh.pa.us> (Tom Lane's message of "Wed, 19 Jun 2019 18:47:38 -0400") Message-ID: <877e9h18df.fsf@news-spur.riddles.org.uk> References: <24452.1560285699@sss.pgh.pa.us> <20190614095546.GA15107@msg.df7cb.de> <26948.1560517875@sss.pgh.pa.us> <87ef3w3u8a.fsf@news-spur.riddles.org.uk> <7114.1560539536@sss.pgh.pa.us> <875zp74zpf.fsf@news-spur.riddles.org.uk> <871rzv4yes.fsf@news-spur.riddles.org.uk> <20190617173943.z3ttxqenbcwrlag4@alap3.anarazel.de> <20190617183458.GG2480@tamriel.snowman.net> <20190617183828.hj7ci362zbxd4nax@alap3.anarazel.de> <20190617184053.GI2480@tamriel.snowman.net> <25314.1560980148@sss.pgh.pa.us> <27991.1560984458@sss.pgh.pa.us> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Thu, 20 Jun 2019 00:59:29 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Tom" == Tom Lane 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)