Share on Google+Share on Google+

timezone_abbreviations_list

Advertisement
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
)

)

Advertisements

Posted on: August 29, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.