PHP
$city = "Australia/NSW";
function get_timezone_abre()
{
global $city;
$dateTime = new DateTime();
$dateTime->setTimeZone(new DateTimeZone($city ));
return 'A'.$dateTime->format('T');
}
Result
AEST
Not sure either this will show daylight saving has started, can someone clarify this please?
Looked at this link, what-are-the-standard-timezone-abbreviations.
Can someone suggest a better way to do this (includes daylight saving)?
Add reading material
Australia DST timezone abbreviation incorrect when using date_default_timezone_set
- Base on this, I assume my abbreviation
EST
is derived from using older php lib.