Skip to content

timezone_abbreviations_list does not show correct abbreviation for Asia/Colombo #20323

@Slatery

Description

@Slatery

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;
		}
	}
}
<?php

Resulted 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions