Skip to content

Commit

Permalink
Update all timezone guess to use TZ 2022g canonical timezones
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinbonneaud committed Mar 28, 2023
1 parent 8525bea commit 4744c21
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion lib/TimeZoneUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
16 changes: 8 additions & 8 deletions lib/TimezoneGuesser/GuessFromMsTzId.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
];

Expand Down
14 changes: 7 additions & 7 deletions lib/timezonedata/exchangezones.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand All @@ -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
Expand Down
40 changes: 20 additions & 20 deletions lib/timezonedata/extrazones.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -133,45 +133,45 @@
'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',
'Tbilisi' => 'Asia/Tbilisi',
'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',
'Uzbekistan' => 'Asia/Tashkent',
'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',
Expand All @@ -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',
Expand All @@ -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',
];
14 changes: 7 additions & 7 deletions lib/timezonedata/lotuszones.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion lib/timezonedata/php-workaround.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
12 changes: 6 additions & 6 deletions lib/timezonedata/windowszones.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand All @@ -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',
Expand Down

0 comments on commit 4744c21

Please sign in to comment.