PHPtimezone_abbreviations_list()
函数用于返回包含时区名称、偏移量和夏令时的关联数组。
语法
array timezone_abbreviations_list();
返回值
此函数在成功时返回数组,在失败时返回 FALSE。
例子1
<?php
$timezone_abbreviations = timezone_abbreviations_list ();
print_r($timezone_abbreviations["acst"]);
echo "----------------------------------------------\n";
$timezone_abbreviations = DateTimeZone::listAbbreviations();
print_r($timezone_abbreviations["acst"]);
?>
输出:
Array
(
[0] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Adelaide
)
[1] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Adelaide
)
[2] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Broken_Hill
)
[3] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Darwin
)
[4] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/North
)
[5] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/South
)
[6] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Yancowinna
)
[7] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Broken_Hill
)
[8] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Darwin
)
[9] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/North
)
[10] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/South
)
[11] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Yancowinna
)
)
----------------------------------------------
Array
(
[0] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Adelaide
)
[1] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Adelaide
)
[2] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Broken_Hill
)
[3] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Darwin
)
[4] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/North
)
[5] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/South
)
[6] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Yancowinna
)
[7] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Broken_Hill
)
[8] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Darwin
)
[9] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/North
)
[10] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/South
)
[11] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Yancowinna
)
)
(
[0] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Adelaide
)
[1] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Adelaide
)
[2] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Broken_Hill
)
[3] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Darwin
)
[4] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/North
)
[5] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/South
)
[6] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Yancowinna
)
[7] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Broken_Hill
)
[8] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Darwin
)
[9] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/North
)
[10] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/South
)
[11] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Yancowinna
)
)
----------------------------------------------
Array
(
[0] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Adelaide
)
[1] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Adelaide
)
[2] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Broken_Hill
)
[3] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Darwin
)
[4] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/North
)
[5] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/South
)
[6] => Array
(
[dst] =>
[offset] => 32400
[timezone_id] => Australia/Yancowinna
)
[7] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Broken_Hill
)
[8] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Darwin
)
[9] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/North
)
[10] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/South
)
[11] => Array
(
[dst] =>
[offset] => 34200
[timezone_id] => Australia/Yancowinna
)
)