-
Notifications
You must be signed in to change notification settings - Fork 8k
Open
Description
Description
The following code:
$abbreviations = timezone_abbreviations_list();
foreach ( $abbreviations as $abbreviation => $timezones ) {
foreach ( $timezones as $timezone ) {
if ( $timezone['timezone_id'] === 'Asia/Colombo') {
return $abbreviation;
}
}
}
<?phpResulted in this output:
'MMT'
But I expected this output instead:
5:30
As per IANA raw data, Asia/Colombo (Sri Lanka) is supposed to be showing the numeric abbreviation, however it instead shows the last text based abbreviation MMT which has not been used for over a century, and can be confused with the geographically close Myanmar Standard Time (abbreviated as MMT) which is an hour advanced of Colombo at +6:30. If a text based abbreviation must be used, then Sri Lankan Standard Time (SLST) would be the most up to date and correct abbreviation.
PHP Version
PHP 8.3.21 (cli) (built: May 9 2025 06:23:02) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.21, Copyright (c) Zend Technologies
with Zend OPcache v8.3.21, Copyright (c), by Zend Technologies
Operating System
No response