From 4744c2149286ec6137aba501e641b77a77d22f88 Mon Sep 17 00:00:00 2001 From: Valentin Bonneaud Date: Tue, 28 Mar 2023 19:18:58 +0200 Subject: [PATCH] Update all timezone guess to use TZ 2022g canonical timezones --- lib/TimeZoneUtil.php | 2 +- lib/TimezoneGuesser/GuessFromMsTzId.php | 16 +++++----- lib/timezonedata/exchangezones.php | 14 ++++----- lib/timezonedata/extrazones.php | 40 ++++++++++++------------- lib/timezonedata/lotuszones.php | 14 ++++----- lib/timezonedata/php-workaround.php | 2 +- lib/timezonedata/windowszones.php | 12 ++++---- 7 files changed, 50 insertions(+), 50 deletions(-) diff --git a/lib/TimeZoneUtil.php b/lib/TimeZoneUtil.php index 3d9885b0d..c81b96a1e 100644 --- a/lib/TimeZoneUtil.php +++ b/lib/TimeZoneUtil.php @@ -230,7 +230,7 @@ public static function clean(): void 30 => 'America/Noronha', 8 => 'America/Sao_Paulo', // Best guess 32 => 'America/Argentina/Buenos_Aires', - 60 => 'America/Godthab', + 60 => 'America/Nuuk', 28 => 'America/St_Johns', 9 => 'America/Halifax', 33 => 'America/Caracas', diff --git a/lib/TimezoneGuesser/GuessFromMsTzId.php b/lib/TimezoneGuesser/GuessFromMsTzId.php index b11ce1832..21586d753 100644 --- a/lib/TimezoneGuesser/GuessFromMsTzId.php +++ b/lib/TimezoneGuesser/GuessFromMsTzId.php @@ -26,29 +26,29 @@ class GuessFromMsTzId implements TimezoneGuesser 4 => 'Europe/Berlin', 6 => 'Europe/Prague', 3 => 'Europe/Paris', - 69 => 'Africa/Luanda', // This was a best guess + 69 => 'Africa/Lagos', // This was a best guess 7 => 'Europe/Athens', 5 => 'Europe/Bucharest', 49 => 'Africa/Cairo', - 50 => 'Africa/Harare', + 50 => 'Africa/Maputo', 59 => 'Europe/Helsinki', 27 => 'Asia/Jerusalem', 26 => 'Asia/Baghdad', - 74 => 'Asia/Kuwait', + 74 => 'Asia/Riyadh', 51 => 'Europe/Moscow', 56 => 'Africa/Nairobi', 25 => 'Asia/Tehran', - 24 => 'Asia/Muscat', // Best guess + 24 => 'Asia/Dubai', // Best guess 54 => 'Asia/Baku', 48 => 'Asia/Kabul', 58 => 'Asia/Yekaterinburg', 47 => 'Asia/Karachi', - 23 => 'Asia/Calcutta', + 23 => 'Asia/Kolkata', 62 => 'Asia/Kathmandu', 46 => 'Asia/Almaty', 71 => 'Asia/Dhaka', 66 => 'Asia/Colombo', - 61 => 'Asia/Rangoon', + 61 => 'Asia/Yangon', 22 => 'Asia/Bangkok', 64 => 'Asia/Krasnoyarsk', 45 => 'Asia/Shanghai', @@ -75,7 +75,7 @@ class GuessFromMsTzId implements TimezoneGuesser 30 => 'America/Noronha', 8 => 'America/Sao_Paulo', // Best guess 32 => 'America/Argentina/Buenos_Aires', - 60 => 'America/Godthab', + 60 => 'America/Nuuk', 28 => 'America/St_Johns', 9 => 'America/Halifax', 33 => 'America/Caracas', @@ -92,7 +92,7 @@ class GuessFromMsTzId implements TimezoneGuesser 13 => 'America/Los_Angeles', // Best guess 14 => 'America/Anchorage', 15 => 'Pacific/Honolulu', - 16 => 'Pacific/Midway', + 16 => 'Pacific/Pago_Pago', 39 => 'Pacific/Kwajalein', ]; diff --git a/lib/timezonedata/exchangezones.php b/lib/timezonedata/exchangezones.php index 9a92cc433..9431db84e 100644 --- a/lib/timezonedata/exchangezones.php +++ b/lib/timezonedata/exchangezones.php @@ -21,20 +21,20 @@ 'Brussels, Copenhagen, Madrid, Paris' => 'Europe/Paris', 'Paris, Madrid, Brussels, Copenhagen' => 'Europe/Paris', 'Prague, Central Europe' => 'Europe/Prague', - 'Sarajevo, Skopje, Sofija, Vilnius, Warsaw, Zagreb' => 'Europe/Sarajevo', - 'West Central Africa' => 'Africa/Luanda', // This was a best guess + 'Sarajevo, Skopje, Sofija, Vilnius, Warsaw, Zagreb' => 'Europe/Vilnius', + 'West Central Africa' => 'Africa/Lagos', // This was a best guess 'Athens, Istanbul, Minsk' => 'Europe/Athens', 'Bucharest' => 'Europe/Bucharest', 'Cairo' => 'Africa/Cairo', - 'Harare, Pretoria' => 'Africa/Harare', + 'Harare, Pretoria' => 'Africa/Maputo', 'Helsinki, Riga, Tallinn' => 'Europe/Helsinki', 'Israel, Jerusalem Standard Time' => 'Asia/Jerusalem', 'Baghdad' => 'Asia/Baghdad', - 'Arab, Kuwait, Riyadh' => 'Asia/Kuwait', + 'Arab, Kuwait, Riyadh' => 'Asia/Riyadh', 'Moscow, St. Petersburg, Volgograd' => 'Europe/Moscow', 'East Africa, Nairobi' => 'Africa/Nairobi', 'Tehran' => 'Asia/Tehran', - 'Abu Dhabi, Muscat' => 'Asia/Muscat', // Best guess + 'Abu Dhabi, Muscat' => 'Asia/Dubai', // Best guess 'Baku, Tbilisi, Yerevan' => 'Asia/Baku', 'Kabul' => 'Asia/Kabul', 'Ekaterinburg' => 'Asia/Yekaterinburg', @@ -71,7 +71,7 @@ 'Mid-Atlantic' => 'America/Noronha', 'Brasilia' => 'America/Sao_Paulo', // Best guess 'Buenos Aires' => 'America/Argentina/Buenos_Aires', - 'Greenland' => 'Atlantic/Stanley', + 'Greenland' => 'America/Nuuk', 'Newfoundland' => 'America/St_Johns', 'Atlantic Time (Canada)' => 'America/Halifax', 'Caracas, La Paz' => 'America/Caracas', @@ -89,7 +89,7 @@ 'Pacific Time (US & Canada); Tijuana' => 'America/Los_Angeles', // Best guess 'Alaska' => 'America/Anchorage', 'Hawaii' => 'Pacific/Honolulu', - 'Midway Island, Samoa' => 'Pacific/Midway', + 'Midway Island, Samoa' => 'Pacific/Pago_Pago', 'Eniwetok, Kwajalein, Dateline Time' => 'Pacific/Kwajalein', // Localized timezones diff --git a/lib/timezonedata/extrazones.php b/lib/timezonedata/extrazones.php index 58bdabb28..d93ab4203 100644 --- a/lib/timezonedata/extrazones.php +++ b/lib/timezonedata/extrazones.php @@ -39,20 +39,20 @@ 'Bolivia' => 'America/La_Paz', 'Borneo' => 'Asia/Kuching', 'British' => 'Europe/London', - 'Brunei' => 'Asia/Brunei', + 'Brunei' => 'Asia/Kuching', 'Casey' => 'Antarctica/Casey', - 'Chamorro' => 'Pacific/Saipan', + 'Chamorro' => 'Pacific/Guam', 'Chatham' => 'Pacific/Chatham', 'Chile' => 'America/Santiago', 'Choibalsan' => 'Asia/Choibalsan', - 'Christmas' => 'Indian/Christmas', - 'Cocos' => 'Indian/Cocos', + 'Christmas' => 'Asia/Bangkok', + 'Cocos' => 'Asia/Yangon', 'Colombia' => 'America/Bogota', 'Cook' => 'Pacific/Rarotonga', 'Dacca' => 'Asia/Dhaka', 'Davis' => 'Antarctica/Davis', 'Dominican' => 'America/Santo_Domingo', - 'DumontDUrville' => 'Antarctica/DumontDUrville', + 'DumontDUrville' => 'Pacific/Port_Moresby', 'Dushanbe' => 'Asia/Dushanbe', 'Dutch Guiana' => 'America/Paramaribo', 'East Timor' => 'Asia/Dili', @@ -65,7 +65,7 @@ 'Falkland' => 'Atlantic/Stanley', 'Fiji Islands Standard Time' => 'Pacific/Fiji', 'French Guiana' => 'America/Cayenne', - 'French Southern' => 'Indian/Kerguelen', + 'French Southern' => 'Indian/Maldives', 'Frunze' => 'Asia/Bishkek', 'Galapagos' => 'Pacific/Galapagos', 'Gambier' => 'Pacific/Gambier', @@ -75,7 +75,7 @@ 'Goose Bay' => 'America/Goose_Bay', 'Greenland Central' => 'America/Scoresbysund', 'Greenland Eastern' => 'America/Scoresbysund', - 'Greenland Western' => 'Atlantic/Stanley', + 'Greenland Western' => 'America/Nuuk', 'Guam' => 'Pacific/Guam', 'Gulf' => 'Asia/Dubai', 'Guyana' => 'America/Guyana', @@ -106,11 +106,11 @@ 'Macquarie' => 'Antarctica/Macquarie', 'Magadan' => 'Asia/Magadan', 'Magallanes Standard Time' => 'America/Punta_Arenas', - 'Malaya' => 'Asia/Kuala_Lumpur', + 'Malaya' => 'Asia/Singapore', 'Malaysia' => 'Asia/Kuching', 'Maldives' => 'Indian/Maldives', 'Marquesas' => 'Pacific/Marquesas', - 'Marshall Islands' => 'Pacific/Majuro', + 'Marshall Islands' => 'Pacific/Tarawa', 'Mawson' => 'Antarctica/Mawson', 'Mexico Pacific' => 'America/Mazatlan', 'Mexico Standard Time' => 'America/Mexico_City', @@ -123,7 +123,7 @@ 'Niue' => 'Pacific/Niue', 'Norfolk' => 'Pacific/Norfolk', 'Noronha' => 'America/Noronha', - 'North Mariana' => 'Pacific/Saipan', + 'North Mariana' => 'Pacific/Guam', 'Novosibirsk' => 'Asia/Novosibirsk', 'Omsk' => 'Asia/Omsk', 'Omsk Standard Time' => 'Asia/Omsk', @@ -133,27 +133,27 @@ 'Paraguay' => 'America/Asuncion', 'Peru' => 'America/Lima', 'Philippines' => 'Asia/Manila', - 'Phoenix Islands' => 'Pacific/Fakaofo', + 'Phoenix Islands' => 'Pacific/Kanton', 'Pierre Miquelon' => 'America/Miquelon', 'Pitcairn' => 'Pacific/Pitcairn', 'Pyongyang' => 'Asia/Pyongyang', 'Qyzylorda' => 'Asia/Qyzylorda', 'Qyzylorda Standard Time' => 'Asia/Qyzylorda', - 'Reunion' => 'Indian/Reunion', + 'Reunion' => 'Asia/Dubai', 'Rothera' => 'Antarctica/Rothera', 'Sakhalin' => 'Asia/Sakhalin', 'Samara' => 'Europe/Samara', 'Samarkand' => 'Asia/Samarkand', 'Sao Tome Standard Time' => 'Africa/Sao_Tome', 'Saratov Standard Time' => 'Europe/Saratov', - 'Seychelles' => 'Indian/Mahe', + 'Seychelles' => 'Asia/Dubai', 'Shevchenko' => 'Asia/Aqtau', 'Solomon' => 'Pacific/Guadalcanal', 'South Georgia' => 'Atlantic/South_Georgia', 'Sudan Standard Time' => 'Africa/Khartoum', 'Suriname' => 'America/Paramaribo', 'Sverdlovsk' => 'Asia/Yekaterinburg', - 'Syowa' => 'Antarctica/Syowa', + 'Syowa' => 'Asia/Riyadh', 'Tahiti' => 'Pacific/Tahiti', 'Tajikistan' => 'Asia/Dushanbe', 'Tashkent' => 'Asia/Tashkent', @@ -161,7 +161,7 @@ 'Tokelau' => 'Pacific/Fakaofo', 'Transitional Islamic State Of Afghanistan Standard Time' => 'Asia/Kabul', 'Turkmenistan' => 'Asia/Ashgabat', - 'Tuvalu' => 'Pacific/Funafuti', + 'Tuvalu' => 'Pacific/Tarawa', 'Uralsk' => 'Asia/Oral', 'Uruguay' => 'America/Montevideo', 'Urumqi' => 'Asia/Urumqi', @@ -169,9 +169,9 @@ 'Vanuatu' => 'Pacific/Efate', 'Volgograd' => 'Europe/Volgograd', 'Volgograd Standard Time' => 'Europe/Volgograd', - 'Vostok' => 'Antarctica/Vostok', - 'Wake' => 'Pacific/Wake', - 'Wallis' => 'Pacific/Wallis', + 'Vostok' => 'Asia/Urumqi', + 'Wake' => 'Pacific/Tarawa', + 'Wallis' => 'Pacific/Tarawa', 'Yekaterinburg' => 'Asia/Yekaterinburg', 'Yerevan' => 'Asia/Yerevan', 'Yukon' => 'America/Yakutat', @@ -186,7 +186,7 @@ 'Myanmar Standard Time' => 'Asia/Yangon', 'Nepal Standard Time' => 'Asia/Kathmandu', 'Rangoon' => 'Asia/Yangon', - 'Greenwich' => 'Atlantic/Reykjavik', + 'Greenwich' => 'Africa/Abidjan', 'UTC-02' => 'America/Noronha', 'UTC-08' => 'Pacific/Pitcairn', 'UTC-09' => 'Pacific/Gambier', @@ -201,7 +201,7 @@ 'Asia/Kashgar' => 'Asia/Urumqi', 'Pacific/Johnston' => 'Pacific/Honolulu', 'EDT' => 'America/Manaus', - 'America/Godthab' => 'Atlantic/Stanley', + 'America/Godthab' => 'America/Nuuk', 'CDT' => 'America/Chicago', 'PST' => 'America/Los_Angeles', ]; diff --git a/lib/timezonedata/lotuszones.php b/lib/timezonedata/lotuszones.php index 4ba6e3cbe..3f6f7b339 100644 --- a/lib/timezonedata/lotuszones.php +++ b/lib/timezonedata/lotuszones.php @@ -34,19 +34,19 @@ 'Newfoundland' => 'America/St_Johns', 'Argentina' => 'America/Argentina/Buenos_Aires', 'E. South America' => 'America/Belem', - 'Greenland' => 'Atlantic/Stanley', + 'Greenland' => 'America/Nuuk', 'Montevideo' => 'America/Montevideo', 'SA Eastern' => 'America/Belem', // 'Mid-Atlantic' => 'Etc/GMT-2', // conflict with windows timezones. 'Azores' => 'Atlantic/Azores', 'Cape Verde' => 'Atlantic/Cape_Verde', - 'Greenwich' => 'Atlantic/Reykjavik', // No I'm serious.. Greenwich is not GMT. + 'Greenwich' => 'Africa/Abidjan', // No I'm serious.. Greenwich is not GMT. 'Morocco' => 'Africa/Casablanca', 'Central Europe' => 'Europe/Prague', - 'Central European' => 'Europe/Sarajevo', + 'Central European' => 'Europe/Belgrade', 'Romance' => 'Europe/Paris', 'W. Central Africa' => 'Africa/Lagos', // Best guess - 'W. Europe' => 'Europe/Amsterdam', + 'W. Europe' => 'Europe/Brussels', 'E. Europe' => 'Europe/Minsk', 'Egypt' => 'Africa/Cairo', 'FLE' => 'Europe/Helsinki', @@ -55,14 +55,14 @@ 'Jordan' => 'Asia/Amman', 'Middle East' => 'Asia/Beirut', 'Namibia' => 'Africa/Windhoek', - 'South Africa' => 'Africa/Harare', - 'Arab' => 'Asia/Kuwait', + 'South Africa' => 'Africa/Maputo', + 'Arab' => 'Asia/Riyadh', 'Arabic' => 'Asia/Baghdad', 'E. Africa' => 'Africa/Nairobi', 'Georgian' => 'Asia/Tbilisi', 'Russian' => 'Europe/Moscow', 'Iran' => 'Asia/Tehran', - 'Arabian' => 'Asia/Muscat', + 'Arabian' => 'Asia/Dubai', 'Armenian' => 'Asia/Yerevan', 'Azerbijan' => 'Asia/Baku', 'Caucasus' => 'Asia/Yerevan', diff --git a/lib/timezonedata/php-workaround.php b/lib/timezonedata/php-workaround.php index 13ff4b302..bd8fcdf1b 100644 --- a/lib/timezonedata/php-workaround.php +++ b/lib/timezonedata/php-workaround.php @@ -25,7 +25,7 @@ 'GMT0' => 'UTC', 'Greenwich' => 'UTC', 'Hongkong' => 'Asia/Hong_Kong', - 'Iceland' => 'Atlantic/Reykjavik', + 'Iceland' => 'Africa/Abidjan', 'Iran' => 'Asia/Tehran', 'Israel' => 'Asia/Jerusalem', 'Jamaica' => 'America/Jamaica', diff --git a/lib/timezonedata/windowszones.php b/lib/timezonedata/windowszones.php index c1bd8026f..42fdaf5a7 100644 --- a/lib/timezonedata/windowszones.php +++ b/lib/timezonedata/windowszones.php @@ -55,13 +55,13 @@ 'Eastern Standard Time (Mexico)' => 'America/Cancun', 'Egypt Standard Time' => 'Africa/Cairo', 'Ekaterinburg Standard Time' => 'Asia/Yekaterinburg', - 'FLE Standard Time' => 'Europe/Kiev', + 'FLE Standard Time' => 'Europe/Kyiv', 'Fiji Standard Time' => 'Pacific/Fiji', 'GMT Standard Time' => 'Europe/London', 'GTB Standard Time' => 'Europe/Bucharest', 'Georgian Standard Time' => 'Asia/Tbilisi', - 'Greenland Standard Time' => 'Atlantic/Stanley', - 'Greenwich Standard Time' => 'Atlantic/Reykjavik', + 'Greenland Standard Time' => 'America/Nuuk', + 'Greenwich Standard Time' => 'Africa/Abidjan', 'Haiti Standard Time' => 'America/Port-au-Prince', 'Hawaiian Standard Time' => 'Pacific/Honolulu', 'India Standard Time' => 'Asia/Calcutta', @@ -178,7 +178,7 @@ 'cabo verde is' => 'Atlantic/Cape_Verde', 'coordinated universal time' => 'UTC', 'dublin, edinburgh, lisbon, london' => 'Europe/London', - 'monrovia, reykjavik' => 'Atlantic/Reykjavik', + 'monrovia, reykjavik' => 'Africa/Abidjan', 'belgrade, bratislava, budapest, ljubljana, prague' => 'Europe/Budapest', 'casablanca' => 'Africa/Casablanca', 'sao tome' => 'Africa/Sao_Tome', @@ -210,7 +210,7 @@ 'kathmandu' => 'Asia/Kathmandu', 'astana' => 'Asia/Almaty', 'dhaka' => 'Asia/Dhaka', - 'yangon (rangoon)' => 'Asia/Rangoon', + 'yangon (rangoon)' => 'Asia/Yangon', 'barnaul, gorno-altaysk' => 'Asia/Barnaul', 'tomsk' => 'Asia/Tomsk', 'beijing, chongqing, hong kong, urumqi' => 'Asia/Shanghai', @@ -232,7 +232,7 @@ 'coordinated universal time+12' => 'Pacific/Tarawa', 'petropavlovsk-kamchatsky - old' => 'Asia/Anadyr', 'chatham islands' => 'Pacific/Chatham', - 'coordinated universal time+13' => 'Pacific/Fakaofo', + 'coordinated universal time+13' => 'Pacific/Kanton', "nuku'alofa" => 'Pacific/Tongatapu', 'kiritimati island' => 'Pacific/Kiritimati', 'helsinki, kyiv, riga, sofia, tallinn, vilnius' => 'Europe/Helsinki',