扫码一下
查看教程更方便
输出 "adt" 时区的夏令时、偏移量和时区名称:
<?php
// Print dst, offset, and timezone name for the "adt" timezone
$tzlist=timezone_abbreviations_list();
print_r($tzlist["adt"]);
// Print the whole list
//print_r(timezone_abbreviations_list());
?>
执行结果
Array
(
[0] => Array
(
[dst] => 1
[offset] => -10800
[timezone_id] => America/Halifax
)
[1] => Array
(
[dst] => 1
[offset] => -10800
[timezone_id] => America/Barbados
)
[2] => Array
(
[dst] => 1
[offset] => -10800
[timezone_id] => America/Blanc-Sablon
)
[3] => Array
(
[dst] => 1
[offset] => -10800
[timezone_id] => America/Glace_Bay
)
[4] => Array
(
[dst] => 1
[offset] => -10800
[timezone_id] => America/Goose_Bay
)
[5] => Array
(
[dst] => 1
[offset] => -10800
[timezone_id] => America/Martinique
)
[6] => Array
(
[dst] => 1
[offset] => -10800
[timezone_id] => America/Moncton
)
[7] => Array
(
[dst] => 1
[offset] => -10800
[timezone_id] => America/Pangnirtung
)
[8] => Array
(
[dst] => 1
[offset] => -10800
[timezone_id] => America/Thule
)
[9] => Array
(
[dst] => 1
[offset] => -10800
[timezone_id] => Atlantic/Bermuda
)
[10] => Array
(
[dst] => 1
[offset] => -10800
[timezone_id] => Canada/Atlantic
)
)
timezone_abbreviations_list() 返回包含夏令时、偏移量和时区名称的关联数组。
timezone_abbreviations_list();