Home Tutorial Php Phpdate timezone_abbreviations_list

 
 

Share on Google+Share on Google+
timezone_abbreviations_list
Posted on: August 29, 2009 at 12:00 AM
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
)

)

Advertisement

Related Tags for timezone_abbreviations_list:


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.

Posted on: August 29, 2009

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com