DateTimeZone::listAbbreviations
DateTimeZone::listAbbreviations
timezone_abbreviations_list
(PHP 5 >= 5.2.0, PHP 7)
DateTimeZone :: listAbbreviations - timezone_abbreviations_list - 返回包含dst,offset和时区名称的关联数组
Description
面向对象的风格
public static array DateTimeZone::listAbbreviations ( void )
程序风格
array timezone_abbreviations_list ( void )
Return Values
成功时返回数组或返回FALSE
失败。
Examples
Example #1 A
timezone
_
abbreviations
_
list()
example
<?php
$timezone_abbreviations = DateTimeZone::listAbbreviations(
print_r($timezone_abbreviations["acst"]
?>
上面的例子会输出类似于:
Array
(
[0] => Array
(
[dst] => 1
[offset] => -14400
[timezone_id] => America/Porto_Acre
)
[1] => Array
(
[dst] => 1
[offset] => -14400
[timezone_id] => America/Eirunepe
)
[2] => Array
(
[dst] => 1
[offset] => -14400
[timezone_id] => America/Rio_Branco
)
[3] => Array
(
[dst] => 1
[offset] => -14400
[timezone_id] => Brazil/Acre
)
)
← DateTimeZone::getTransitions
DateTimeZone::listIdentifiers →
© 1997–2017 The PHP Documentation Group
根据知识共享署名许可证v3.0或更高版本授权。