Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mW1tM-0007jX-P4 for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Sep 2021 19:38:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mW1tL-0002hP-Mg for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Sep 2021 19:38:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mW1tL-0002hH-F8 for pgsql-hackers@lists.postgresql.org; Thu, 30 Sep 2021 19:38:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mW1tG-0000eb-SA for pgsql-hackers@postgresql.org; Thu, 30 Sep 2021 19:38:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 18UJccp23204191; Thu, 30 Sep 2021 15:38:38 -0400 From: Tom Lane To: Andrew Dunstan cc: Andres Freund , pgsql-hackers@postgresql.org, Peter Eisentraut , Petr Jelinek Subject: Re: 002_types.pl fails on some timezones on windows In-reply-to: References: <20210930183641.7lh4jhvpipvromca@alap3.anarazel.de> Comments: In-reply-to Andrew Dunstan message dated "Thu, 30 Sep 2021 15:19:30 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3204189.1633030718.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 30 Sep 2021 15:38:38 -0400 Message-ID: <3204190.1633030718@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andrew Dunstan writes: > On 9/30/21 2:36 PM, Andres Freund wrote: >> CI showed me a failure in 002_types.pl on windows. I only just now noti= ced >> that because the subscription tests aren't run by any of the vcregress.= pl >> steps :( > We have windows buildfarm animals running the subscription tests, e.g. > > and they do it by calling vcregress.pl. But are they running with the prevailing zone set to "Greenwich Standard Time"? I dug around to see exactly how we handle that, and was somewhat gobsmacked to find this mapping in findtimezone.c: /* (UTC+00:00) Monrovia, Reykjavik */ "Greenwich Standard Time", "Greenwich Daylight Time", "Africa/Casablanca" According to current tzdb, # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Casablanca -0:30:20 - LMT 1913 Oct 26 0:00 Morocco +00/+01 1984 Mar 16 1:00 - +01 1986 0:00 Morocco +00/+01 2018 Oct 28 3:00 1:00 Morocco +01/+00 Morocco has had weird changes-every-year DST rules since 2008, which'd go a long way towards explaining funny behavior with this zone, even without the "reverse DST" since 2018. And sure enough, 002_types.pl falls over with TZ=3DAfrica/Casablanca on my Linux machine, too. I'm inclined to think we ought to be translating that zone name to Europe/London instead. Or maybe we should translate to straight-up UTC? But the option of "Greenwich Daylight Time" suggests that Windows thinks this means UK civil time, not UTC. I wonder if findtimezone.c has any other surprising Windows mappings. I've never dug through that list particularly. regards, tom lane