Add further improvements to TZs

This commit is contained in:
Ilia Ross
2024-06-09 04:39:53 +03:00
parent 35298efd8a
commit abeff44b1a

View File

@@ -1296,65 +1296,84 @@ eval "use DateTime; use DateTime::TimeZone;";
return \@events if ($@);
# Timezone map
my %timezone_map = (
'Eastern Standard Time' => 'EST',
'Central Standard Time' => 'CST',
'Mountain Standard Time' => 'MST',
'Pacific Standard Time' => 'PST',
'Alaskan Standard Time' => 'AKST',
'Hawaiian Standard Time' => 'HST',
'Atlantic Standard Time' => 'AST',
'Newfoundland Standard Time' => 'NST',
'Greenwich Mean Time' => 'GMT',
'British Summer Time' => 'BST',
'Central European Time' => 'CET',
'Eastern European Time' => 'EET',
'Australian Eastern Standard Time' => 'AEST',
'Australian Central Standard Time' => 'ACST',
'Indian Standard Time' => 'IST',
'Japan Standard Time' => 'JST',
'China Standard Time' => 'CST',
'Korea Standard Time' => 'KST',
'Singapore Standard Time' => 'SGT',
'Arabian Standard Time' => 'AST',
'Brasília Time' => 'BRT',
'Central Africa Time' => 'CAT',
'West Africa Time' => 'WAT',
'Eastern Africa Time' => 'EAT',
'Argentina Time' => 'ART',
'Venezuelan Standard Time' => 'VET',
'New Zealand Standard Time' => 'NZST',
'Western European Time' => 'WET',
'Eastern Standard Time (Australia)' => 'EST',
'Central Standard Time (Australia)' => 'CST',
'Western Standard Time (Australia)' => 'WST',
'Arabian Standard Time' => 'AST',
'Israel Standard Time' => 'IST',
'Iran Standard Time' => 'IRST',
'Moscow Standard Time' => 'MSK',
'Bangladesh Standard Time' => 'BST',
'Myanmar Standard Time' => 'MMT',
'Afghanistan Time' => 'AFT',
'Nepal Time' => 'NPT',
'Central Indonesia Time' => 'WITA',
'Eastern Indonesia Time' => 'WIT',
'Western Indonesia Time' => 'WIB',
'Alaskan Daylight Time' => 'AKDT',
'Alaskan Standard Time' => 'AKST',
'Anadyr Time' => 'ANAT',
'Arabian Standard Time' => 'AST',
'Argentina Time' => 'ART',
'Atlantic Daylight Time' => 'ADT',
'Atlantic Standard Time' => 'AST',
'Australian Central Daylight Time' => 'ACDT',
'Australian Central Standard Time' => 'ACST',
'Australian Eastern Daylight Time' => 'AEDT',
'Australian Eastern Standard Time' => 'AEST',
'Bangladesh Standard Time' => 'BST',
'Brasília Time' => 'BRT',
'British Summer Time' => 'BST',
'Central Africa Time' => 'CAT',
'Central Asia Time' => 'ALMT',
'East Africa Time' => 'EAT',
'West Africa Time' => 'WAT',
'South Africa Standard Time' => 'SAST',
'Pakistan Standard Time' => 'PKT',
'Malaysia Time' => 'MYT',
'Philippine Time' => 'PHT',
'Hong Kong Time' => 'HKT',
'Fiji Time' => 'FJT',
'Tahiti Time' => 'TAHT',
'Hawaii-Aleutian Standard Time' => 'HAST',
'Samoa Standard Time' => 'SST',
'Central Daylight Time' => 'CDT',
'Central Daylight Time (US)' => 'CDT',
'Central European Summer Time' => 'CEST',
'Central European Time' => 'CET',
'Central Indonesia Time' => 'WITA',
'Central Standard Time (Australia)' => 'CST',
'Central Standard Time (US)' => 'CST',
'Central Standard Time' => 'CST',
'Chamorro Daylight Time' => 'CHDT',
'Chamorro Standard Time' => 'CHST',
'New Caledonia Time' => 'NCT',
'China Standard Time' => 'CST',
'Coordinated Universal Time' => 'UTC',
'East Africa Time' => 'EAT',
'Eastern Africa Time' => 'EAT',
'Eastern Daylight Time' => 'EDT',
'Eastern Daylight Time (US)' => 'EDT',
'Eastern European Summer Time' => 'EEST',
'Eastern European Time' => 'EET',
'Eastern Indonesia Time' => 'WIT',
'Eastern Standard Time (Australia)' => 'EST',
'Eastern Standard Time (US)' => 'EST',
'Eastern Standard Time' => 'EST',
'Fiji Time' => 'FJT',
'Greenwich Mean Time' => 'GMT',
'Hawaii-Aleutian Daylight Time' => 'HADT',
'Hawaii-Aleutian Standard Time' => 'HAST',
'Hawaiian Standard Time' => 'HST',
'Hong Kong Time' => 'HKT',
'Indian Standard Time' => 'IST',
'Iran Standard Time' => 'IRST',
'Irish Standard Time' => 'IST',
'Israel Standard Time' => 'IST',
'Japan Standard Time' => 'JST',
'Korea Standard Time' => 'KST',
'Magadan Time' => 'MAGT',
'Malaysia Time' => 'MYT',
'Moscow Standard Time' => 'MSK',
'Mountain Daylight Time' => 'MDT',
'Mountain Standard Time' => 'MST',
'Myanmar Standard Time' => 'MMT',
'Nepal Time' => 'NPT',
'New Caledonia Time' => 'NCT',
'New Zealand Daylight Time' => 'NZDT',
'New Zealand Standard Time' => 'NZST',
'Newfoundland Daylight Time' => 'NDT',
'Newfoundland Standard Time' => 'NST',
'Pacific Daylight Time' => 'PDT',
'Pacific Standard Time' => 'PST',
'Pakistan Standard Time' => 'PKT',
'Philippine Time' => 'PHT',
'Sakhalin Time' => 'SAKT',
'Anadyr Time' => 'ANAT'
'Samoa Standard Time' => 'SST',
'Singapore Standard Time' => 'SGT',
'South Africa Standard Time' => 'SAST',
'Tahiti Time' => 'TAHT',
'Venezuelan Standard Time' => 'VET',
'West Africa Time' => 'WAT',
'Western European Summer Time' => 'WEST',
'Western European Time' => 'WET',
'Western Indonesia Time' => 'WIB',
'Western Standard Time (Australia)' => 'WST',
);
# Make a date from a special timestamp
my $adjust_time_with_timezone = sub {