1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-23 13:29:09 +03:00

findtimezone: update Windows timezone name list for recent events.

The main portion of findtimezone.c's win32_tzmap[] is now directly
generated from the CLDR project's current windowsZones.xml file (using
a script available in the discussion thread, but not yet merged into
our tree).  Windows zone names that are no longer present in CLDR are
kept, but are moved to a separate list at the end of the array to
simplify future management.

The important changes that this brings are inclusion of new zone names
for Canada's upcoming timekeeping changes.  In addition, this tracks a
few minor changes that CLDR has made in other entries:
"Central Asia Standard Time" now maps to Asia/Bishkek, and
"Mountain Standard Time (Mexico)" now maps to America/Mazatlan.

Reported-by: CyberNative AI <ceo@cybernative.ai>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/179219370621.3670768.16110484606338109870@cybernative.ai
Backpatch-through: 14
This commit is contained in:
Tom Lane
2026-10-21 11:52:51 -04:00
parent 154052c354
commit a6782db57d

View File

@@ -735,14 +735,8 @@ static const struct
{
/*
* This list was built from the contents of the registry at
* HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time
* Zones on Windows 7, Windows 10, and Windows Server 2019. Some recent
* additions have been made by comparing to the CLDR project's
* windowsZones.xml file.
*
* The zones have been matched to IANA timezones based on CLDR's mapping
* for "territory 001".
* The contents of this array are mostly generated from the CLDR project's
* windowsZones.xml file. See src/timezone/README for more information.
*/
{
/* (UTC+04:30) Kabul */
@@ -754,6 +748,11 @@ static const struct
"Alaskan Standard Time", "Alaskan Daylight Time",
"America/Anchorage"
},
{
/* (UTC-07:00) Alberta */
"Alberta Standard Time", "Alberta Daylight Time",
"America/Edmonton"
},
{
/* (UTC-10:00) Aleutian Islands */
"Aleutian Standard Time", "Aleutian Daylight Time",
@@ -784,11 +783,6 @@ static const struct
"Argentina Standard Time", "Argentina Daylight Time",
"America/Buenos_Aires"
},
{
/* (UTC+04:00) Baku, Tbilisi, Yerevan */
"Armenian Standard Time", "Armenian Daylight Time",
"Asia/Yerevan"
},
{
/* (UTC+04:00) Astrakhan, Ulyanovsk */
"Astrakhan Standard Time", "Astrakhan Daylight Time",
@@ -845,9 +839,9 @@ static const struct
"Pacific/Bougainville"
},
{
/* (UTC-01:00) Cabo Verde Is. */
"Cabo Verde Standard Time", "Cabo Verde Daylight Time",
"Atlantic/Cape_Verde"
/* (UTC-07:00) British Columbia */
"British Columbia Standard Time", "British Columbia Daylight Time",
"America/Vancouver"
},
{
/* (UTC-06:00) Saskatchewan */
@@ -855,7 +849,7 @@ static const struct
"America/Regina"
},
{
/* (UTC-01:00) Cape Verde Is. */
/* (UTC-01:00) Cabo Verde Is. */
"Cape Verde Standard Time", "Cape Verde Daylight Time",
"Atlantic/Cape_Verde"
},
@@ -877,7 +871,7 @@ static const struct
{
/* (UTC+06:00) Astana */
"Central Asia Standard Time", "Central Asia Daylight Time",
"Asia/Almaty"
"Asia/Bishkek"
},
{
/* (UTC-04:00) Cuiaba */
@@ -919,11 +913,6 @@ static const struct
"China Standard Time", "China Daylight Time",
"Asia/Shanghai"
},
{
/* (UTC) Coordinated Universal Time */
"Coordinated Universal Time", "Coordinated Universal Time",
"UTC"
},
{
/* (UTC-05:00) Havana */
"Cuba Standard Time", "Cuba Daylight Time",
@@ -1005,13 +994,6 @@ static const struct
"America/Godthab"
},
{
/*
* Windows uses this zone name in various places that lie near the
* prime meridian, but are not in the UK. However, most people
* probably think that "Greenwich" means UK civil time, or maybe even
* straight-up UTC. Atlantic/Reykjavik is a decent match for that
* interpretation because Iceland hasn't observed DST since 1968.
*/
/* (UTC+00:00) Monrovia, Reykjavik */
"Greenwich Standard Time", "Greenwich Daylight Time",
"Atlantic/Reykjavik"
@@ -1046,11 +1028,6 @@ static const struct
"Israel Standard Time", "Israel Daylight Time",
"Asia/Jerusalem"
},
{
/* (UTC+02:00) Jerusalem (old spelling of zone name) */
"Jerusalem Standard Time", "Jerusalem Daylight Time",
"Asia/Jerusalem"
},
{
/* (UTC+02:00) Amman */
"Jordan Standard Time", "Jordan Daylight Time",
@@ -1061,11 +1038,6 @@ static const struct
"Kaliningrad Standard Time", "Kaliningrad Daylight Time",
"Europe/Kaliningrad"
},
{
/* (UTC+12:00) Petropavlovsk-Kamchatsky - Old */
"Kamchatka Standard Time", "Kamchatka Daylight Time",
"Asia/Kamchatka"
},
{
/* (UTC+09:00) Seoul */
"Korea Standard Time", "Korea Daylight Time",
@@ -1097,9 +1069,9 @@ static const struct
"America/Punta_Arenas"
},
{
/* (UTC+08:00) Kuala Lumpur, Singapore */
"Malay Peninsula Standard Time", "Malay Peninsula Daylight Time",
"Asia/Kuala_Lumpur"
/* (UTC-05:00) Manitoba */
"Manitoba Standard Time", "Manitoba Daylight Time",
"America/Winnipeg"
},
{
/* (UTC-09:30) Marquesas Islands */
@@ -1111,21 +1083,6 @@ static const struct
"Mauritius Standard Time", "Mauritius Daylight Time",
"Indian/Mauritius"
},
{
/* (UTC-06:00) Guadalajara, Mexico City, Monterrey */
"Mexico Standard Time", "Mexico Daylight Time",
"America/Mexico_City"
},
{
/* (UTC-07:00) Chihuahua, La Paz, Mazatlan */
"Mexico Standard Time 2", "Mexico Daylight Time 2",
"America/Chihuahua"
},
{
/* (UTC-02:00) Mid-Atlantic - Old */
"Mid-Atlantic Standard Time", "Mid-Atlantic Daylight Time",
"Atlantic/South_Georgia"
},
{
/* (UTC+02:00) Beirut */
"Middle East Standard Time", "Middle East Daylight Time",
@@ -1149,7 +1106,7 @@ static const struct
{
/* (UTC-07:00) Chihuahua, La Paz, Mazatlan */
"Mountain Standard Time (Mexico)", "Mountain Daylight Time (Mexico)",
"America/Chihuahua"
"America/Mazatlan"
},
{
/* (UTC+06:30) Yangon (Rangoon) */
@@ -1201,11 +1158,6 @@ static const struct
"North Korea Standard Time", "North Korea Daylight Time",
"Asia/Pyongyang"
},
{
/* (UTC+07:00) Novosibirsk */
"Novosibirsk Standard Time", "Novosibirsk Daylight Time",
"Asia/Novosibirsk"
},
{
/* (UTC+06:00) Omsk */
"Omsk Standard Time", "Omsk Daylight Time",
@@ -1246,11 +1198,6 @@ static const struct
"Romance Standard Time", "Romance Daylight Time",
"Europe/Paris"
},
{
/* (UTC+04:00) Izhevsk, Samara */
"Russia Time Zone 3", "Russia Time Zone 3",
"Europe/Samara"
},
{
/* (UTC+11:00) Chokurdakh */
"Russia Time Zone 10", "Russia Time Zone 10",
@@ -1261,61 +1208,11 @@ static const struct
"Russia Time Zone 11", "Russia Time Zone 11",
"Asia/Kamchatka"
},
{
/* (UTC+02:00) Kaliningrad */
"Russia TZ 1 Standard Time", "Russia TZ 1 Daylight Time",
"Europe/Kaliningrad"
},
{
/* (UTC+03:00) Moscow, St. Petersburg */
"Russia TZ 2 Standard Time", "Russia TZ 2 Daylight Time",
"Europe/Moscow"
},
{
/* (UTC+04:00) Izhevsk, Samara */
"Russia TZ 3 Standard Time", "Russia TZ 3 Daylight Time",
"Russia Time Zone 3", "Russia Time Zone 3",
"Europe/Samara"
},
{
/* (UTC+05:00) Ekaterinburg */
"Russia TZ 4 Standard Time", "Russia TZ 4 Daylight Time",
"Asia/Yekaterinburg"
},
{
/* (UTC+06:00) Novosibirsk (RTZ 5) */
"Russia TZ 5 Standard Time", "Russia TZ 5 Daylight Time",
"Asia/Novosibirsk"
},
{
/* (UTC+07:00) Krasnoyarsk */
"Russia TZ 6 Standard Time", "Russia TZ 6 Daylight Time",
"Asia/Krasnoyarsk"
},
{
/* (UTC+08:00) Irkutsk */
"Russia TZ 7 Standard Time", "Russia TZ 7 Daylight Time",
"Asia/Irkutsk"
},
{
/* (UTC+09:00) Yakutsk */
"Russia TZ 8 Standard Time", "Russia TZ 8 Daylight Time",
"Asia/Yakutsk"
},
{
/* (UTC+10:00) Vladivostok */
"Russia TZ 9 Standard Time", "Russia TZ 9 Daylight Time",
"Asia/Vladivostok"
},
{
/* (UTC+11:00) Chokurdakh */
"Russia TZ 10 Standard Time", "Russia TZ 10 Daylight Time",
"Asia/Magadan"
},
{
/* (UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky */
"Russia TZ 11 Standard Time", "Russia TZ 11 Daylight Time",
"Asia/Anadyr"
},
{
/* (UTC+03:00) Moscow, St. Petersburg */
"Russian Standard Time", "Russian Daylight Time",
@@ -1459,7 +1356,7 @@ static const struct
{
/* (UTC) Coordinated Universal Time */
"UTC", "UTC",
"UTC"
"Etc/UTC"
},
{
/* (UTC+12:00) Coordinated Universal Time+12 */
@@ -1531,11 +1428,6 @@ static const struct
"West Asia Standard Time", "West Asia Daylight Time",
"Asia/Tashkent"
},
{
/* (UTC+02:00) Gaza, Hebron */
"West Bank Gaza Standard Time", "West Bank Gaza Daylight Time",
"Asia/Gaza"
},
{
/* (UTC+02:00) Gaza, Hebron */
"West Bank Standard Time", "West Bank Daylight Time",
@@ -1556,6 +1448,128 @@ static const struct
"Yukon Standard Time", "Yukon Daylight Time",
"America/Whitehorse"
},
/*
* END of CLDR-derived entries
*/
/*
* Obsolete zones, or just obsolete spellings of their names. These are no
* longer derivable from CLDR, but should be kept to support older Windows
* installations.
*/
{
/* (UTC+04:00) Baku, Tbilisi, Yerevan */
"Armenian Standard Time", "Armenian Daylight Time",
"Asia/Yerevan"
},
{
/* (UTC-01:00) Cabo Verde Is. */
"Cabo Verde Standard Time", "Cabo Verde Daylight Time",
"Atlantic/Cape_Verde"
},
{
/* (UTC) Coordinated Universal Time */
"Coordinated Universal Time", "Coordinated Universal Time",
"UTC"
},
{
/* (UTC+02:00) Jerusalem */
"Jerusalem Standard Time", "Jerusalem Daylight Time",
"Asia/Jerusalem"
},
{
/* (UTC+12:00) Petropavlovsk-Kamchatsky */
"Kamchatka Standard Time", "Kamchatka Daylight Time",
"Asia/Kamchatka"
},
{
/* (UTC+08:00) Kuala Lumpur, Singapore */
"Malay Peninsula Standard Time", "Malay Peninsula Daylight Time",
"Asia/Kuala_Lumpur"
},
{
/* (UTC-06:00) Guadalajara, Mexico City, Monterrey */
"Mexico Standard Time", "Mexico Daylight Time",
"America/Mexico_City"
},
{
/* (UTC-07:00) Chihuahua, La Paz, Mazatlan */
"Mexico Standard Time 2", "Mexico Daylight Time 2",
"America/Chihuahua"
},
{
/* (UTC-02:00) Mid-Atlantic */
"Mid-Atlantic Standard Time", "Mid-Atlantic Daylight Time",
"Atlantic/South_Georgia"
},
{
/* (UTC+07:00) Novosibirsk */
"Novosibirsk Standard Time", "Novosibirsk Daylight Time",
"Asia/Novosibirsk"
},
{
/* (UTC+02:00) Kaliningrad */
"Russia TZ 1 Standard Time", "Russia TZ 1 Daylight Time",
"Europe/Kaliningrad"
},
{
/* (UTC+03:00) Moscow, St. Petersburg */
"Russia TZ 2 Standard Time", "Russia TZ 2 Daylight Time",
"Europe/Moscow"
},
{
/* (UTC+04:00) Izhevsk, Samara */
"Russia TZ 3 Standard Time", "Russia TZ 3 Daylight Time",
"Europe/Samara"
},
{
/* (UTC+05:00) Ekaterinburg */
"Russia TZ 4 Standard Time", "Russia TZ 4 Daylight Time",
"Asia/Yekaterinburg"
},
{
/* (UTC+06:00) Novosibirsk (RTZ 5) */
"Russia TZ 5 Standard Time", "Russia TZ 5 Daylight Time",
"Asia/Novosibirsk"
},
{
/* (UTC+07:00) Krasnoyarsk */
"Russia TZ 6 Standard Time", "Russia TZ 6 Daylight Time",
"Asia/Krasnoyarsk"
},
{
/* (UTC+08:00) Irkutsk */
"Russia TZ 7 Standard Time", "Russia TZ 7 Daylight Time",
"Asia/Irkutsk"
},
{
/* (UTC+09:00) Yakutsk */
"Russia TZ 8 Standard Time", "Russia TZ 8 Daylight Time",
"Asia/Yakutsk"
},
{
/* (UTC+10:00) Vladivostok */
"Russia TZ 9 Standard Time", "Russia TZ 9 Daylight Time",
"Asia/Vladivostok"
},
{
/* (UTC+11:00) Chokurdakh */
"Russia TZ 10 Standard Time", "Russia TZ 10 Daylight Time",
"Asia/Magadan"
},
{
/* (UTC+12:00) Anadyr, Petropavlovsk-Kamchatsky */
"Russia TZ 11 Standard Time", "Russia TZ 11 Daylight Time",
"Asia/Anadyr"
},
{
/* (UTC+02:00) Gaza, Hebron */
"West Bank Gaza Standard Time", "West Bank Gaza Daylight Time",
"Asia/Gaza"
},
{
NULL, NULL, NULL
}