timezone_abbreviations_list() 함수는 dst, offset 및 시간대 이름을 포함하는 연관 배열을 반환합니다.
구문
timezone_abbreviations_list()
매개변수
-
해당 없음
반환
timezone_abbreviations_list() 함수는 성공하면 배열을 반환하고 실패하면 FALSE를 반환합니다.
예시
다음은 예입니다 -
<?php $timezone_abbreviations = timezone_abbreviations_list (); print_r($timezone_abbreviations["acst"]); echo "----------------------------------------------\n"; # Using second function. $timezone_abbreviations = DateTimeZone::listAbbreviations(); print_r($timezone_abbreviations["acst"]); ?>
출력
Array ( [0] => Array ( [dst] => 1 [offset] => -14400 [timezone_id] => America/Porto_Acre ) [1] => Array ( [dst] => [offset] => 32400 [timezone_id] => Australia/Adelaide ) [2] => Array ( [dst] => [offset] => 34200 [timezone_id] => Australia/Adelaide ) [3] => Array ( [dst] => 1 [offset] => -14400 [timezone_id] => America/Eirunepe ) [4] => Array ( [dst] => 1 [offset] => -14400 [timezone_id] => America/Rio_Branco ) [5] => Array ( [dst] => 1 [offset] => -14400 [timezone_id] => Brazil/Acre ) [6] => Array ( [dst] => [offset] => 32400 [timezone_id] => Australia/Broken_Hill ) [7] => Array ( [dst] => [offset] => 32400 [timezone_id] => Australia/Darwin ) [8] => Array ( [dst] => [offset] => 32400 [timezone_id] => Australia/North ) [9] => Array ( [dst] => [offset] => 32400 [timezone_id] => Australia/South ) [10] => Array ( [dst] => [offset] => 32400 [timezone_id] => Australia/Yancowinna ) [11] => Array ( [dst] => [offset] => 34200 [timezone_id] => Asia/Jayapura ) [12] => Array ( [dst] => [offset] => 34200 [timezone_id] => Australia/Broken_Hill ) [13] => Array ( [dst] => [offset] => 34200 [timezone_id] => Australia/Darwin ) [14] => Array ( [dst] => [offset] => 34200 [timezone_id] => Australia/North ) [15] => Array( [dst] => [offset] => 34200 [timezone_id] => Australia/South ) [16] => Array ( [dst] => [offset] => 34200 [timezone_id] => Australia/Yancowinna ) ) ---------------------------------------------- Array ( [0] => Array ( [dst] => 1 [offset] => -14400 [timezone_id] => America/Porto_Acre ) [1] => Array ( [dst] => [offset] => 32400 [timezone_id] => Australia/Adelaide ) [2] => Array ( [dst] => [offset] => 34200 [timezone_id] => Australia/Adelaide ) [3] => Array ( [dst] => 1 [offset] => -14400 [timezone_id] => America/Eirunepe ) [4] => Array ( [dst] => 1 [offset] => -14400 [timezone_id] => America/Rio_Branco ) [5] => Array ( [dst] => 1 [offset] => -14400 [timezone_id] => Brazil/Acre ) [6] => Array ( [dst] => [offset] => 32400 [timezone_id] => Australia/Broken_Hill ) [7] => Array ( [dst] => [offset] => 32400 [timezone_id] => Australia/Darwin ) [8] => Array ( [dst] => [offset] => 32400 [timezone_id] => Australia/North ) [9] => Array ( [dst] => [offset] => 32400 [timezone_id] => Australia/South ) [10] => Array ( [dst] => [offset] => 32400 [timezone_id] => Australia/Yancowinna ) [11] => Array ( [dst] => [offset] => 34200 [timezone_id] => Asia/Jayapura ) [12] => Array ( [dst] => [offset] => 34200 [timezone_id] => Australia/Broken_Hill ) [13] => Array ( [dst] => [offset] => 34200 [timezone_id] => Australia/Darwin ) [14] => Array ( [dst] => [offset] => 34200 [timezone_id] => Australia/North ) [15] => Array ( [dst] => [offset] => 34200 [timezone_id] => Australia/South ) [16] => Array ( [dst] => [offset] => 34200 [timezone_id] => Australia/Yancowinna ) )
다른 예를 보겠습니다 -
예시
<?php $res = timezone_abbreviations_list(); print_r($res["act"]); ?>
출력
Array ( [0] => Array ( [dst] => [offset] => -18000 [timezone_id] => America/Porto_Acre ) [1] => Array ( [dst] => [offset] => -18000 [timezone_id] => America/Eirunepe ) [2] => Array ( [dst] => [offset] => -18000 [timezone_id] => America/Rio_Branco ) [3] => Array ( [dst] => [offset] => -18000 [timezone_id] => Brazil/Acre ) )