Re: 002_types.pl fails on some timezones on windows
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Andres Freund <andres@anarazel.de>, pgsql-hackers@postgresql.org,
Peter Eisentraut <peter_e@gmx.net>,
Petr Jelinek <petr@2ndquadrant.com>
Date: 2021-09-30T19:38:38Z
Lists: pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> 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 noticed >> 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. > <https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=drongo&dt=2021-09-29%2019%3A08%3A23&stg=subscription-check> > 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=Africa/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
Commits
-
Doc: improve timezone/README's recipe for tracking Windows zones.
- db692b0c8490 15.0 landed
-
Update our mapping of Windows time zone names some more.
- c1aa3b3c0d21 15.0 landed
- d0b0b70dc2a6 11.14 landed
- cd2479142588 10.19 landed
- c53ff69e1fd2 13.5 landed
- b5f34ae08ad2 9.6.24 landed
- 919c08d909f7 14.1 landed
- 07873a5dc925 12.9 landed
-
Update our mapping of Windows time zone names using CLDR info.
- dbec5a2fea4d 9.6.24 landed
- e323630cdd3c 10.19 landed
- 9cc919b51855 11.14 landed
- e5b25f19b37b 12.9 landed
- 9c76689de442 13.5 landed
- fa8db48791c5 14.1 landed
- 9b8d68cc6589 15.0 landed
-
Re-alphabetize the win32_tzmap[] array.
- 37cbe0f79129 9.6.24 landed
- cb0799db0d8e 10.19 landed
- bb6d426699a6 11.14 landed
- 4721e8aa6223 12.9 landed
- 7ba8eb81f6b7 13.5 landed
- 81464999bc92 14.1 landed
- ad740067aea5 15.0 landed
-
Remove gratuitous environment dependency in 002_types.pl test.
- d30d8257ec74 10.19 landed
- b46710dadf0c 11.14 landed
- f2cf745a038c 12.9 landed
- 649e561f65c5 13.5 landed
- afc6081f6ea8 14.1 landed
- 20f8671ef69b 15.0 landed