timezone_abbreviations_list


 

timezone_abbreviations_list

This is the example of timezone-abbreviations-list() function in PHP.

This is the example of timezone-abbreviations-list() function in PHP.

timezone_abbreviations_list() Function in PHP

timezone_abbreviations_list alias DateTimeZone::listAbbreviations function returns associative array containing dst, offset and the timezone name. It returns array on success or FALSE on failure.

Syntax of timezone_abbreviations_list() Function in PHP

staticarray DateTimeZone::listAbbreviations ( void )
array timezone_abbreviations_list ( void )

Examples on timezone_abbreviations_list() Function in PHP

<?php

$timezone_abbreviations = DateTimeZone::listAbbreviations();
print_r($timezone_abbreviations["acst"]);

?>

The above example will output something similar to:

Array
(
[0] => Array
(
[dst] => 1
[offset] => -14400
[timezone_id] => India/Kolkata
)

[1] => Array
(
[dst] => 1
[offset] => -14400
[timezone_id] => India/Delhi
)

[2] => Array
(
[dst] => 1
[offset] => -14400
[timezone_id] => SriLanka/Colombo
)

[3] => Array
(
[dst] => 1
[offset] => -14400
[timezone_id] => Pakistan/Karachi
)

)

Ads