> 백엔드 개발 > PHP 튜토리얼 > 모든 시간대의 PHP 출력 목록

모든 시간대의 PHP 출력 목록

*文
풀어 주다: 2023-03-18 14:18:02
원래의
3329명이 탐색했습니다.

이 글에서는 주로 PHP가 전세계 시간대 목록을 출력하는 방법을 소개하고, 전세계 시간대 정보를 저장하기 위해 배열 변수를 사용자 정의합니다. 그것이 모두에게 도움이 되기를 바랍니다.

구체적인 구현 방법은 다음과 같습니다.


<?php
$timezones =
array (
 &#39;(GMT-12:00) International Date Line West&#39; => &#39;Pacific/Wake&#39;,
 &#39;(GMT-11:00) Midway Island&#39; => &#39;Pacific/Apia&#39;,
 &#39;(GMT-11:00) Samoa&#39; => &#39;Pacific/Apia&#39;,
 &#39;(GMT-10:00) Hawaii&#39; => &#39;Pacific/Honolulu&#39;,
 &#39;(GMT-09:00) Alaska&#39; => &#39;America/Anchorage&#39;,
 &#39;(GMT-08:00) Pacific Time (US & Canada); Tijuana&#39; => &#39;America/Los_Angeles&#39;,
 &#39;(GMT-07:00) Arizona&#39; => &#39;America/Phoenix&#39;,
 &#39;(GMT-07:00) Chihuahua&#39; => &#39;America/Chihuahua&#39;,
 &#39;(GMT-07:00) La Paz&#39; => &#39;America/Chihuahua&#39;,
 &#39;(GMT-07:00) Mazatlan&#39; => &#39;America/Chihuahua&#39;,
 &#39;(GMT-07:00) Mountain Time (US & Canada)&#39; => &#39;America/Denver&#39;,
 &#39;(GMT-06:00) Central America&#39; => &#39;America/Managua&#39;,
 &#39;(GMT-06:00) Central Time (US & Canada)&#39; => &#39;America/Chicago&#39;,
 &#39;(GMT-06:00) Guadalajara&#39; => &#39;America/Mexico_City&#39;,
 &#39;(GMT-06:00) Mexico City&#39; => &#39;America/Mexico_City&#39;,
 &#39;(GMT-06:00) Monterrey&#39; => &#39;America/Mexico_City&#39;,
 &#39;(GMT-06:00) Saskatchewan&#39; => &#39;America/Regina&#39;,
 &#39;(GMT-05:00) Bogota&#39; => &#39;America/Bogota&#39;,
 &#39;(GMT-05:00) Eastern Time (US & Canada)&#39; => &#39;America/New_York&#39;,
 &#39;(GMT-05:00) Indiana (East)&#39; => &#39;America/Indiana/Indianapolis&#39;,
 &#39;(GMT-05:00) Lima&#39; => &#39;America/Bogota&#39;,
 &#39;(GMT-05:00) Quito&#39; => &#39;America/Bogota&#39;,
 &#39;(GMT-04:00) Atlantic Time (Canada)&#39; => &#39;America/Halifax&#39;,
 &#39;(GMT-04:00) Caracas&#39; => &#39;America/Caracas&#39;,
 &#39;(GMT-04:00) La Paz&#39; => &#39;America/Caracas&#39;,
 &#39;(GMT-04:00) Santiago&#39; => &#39;America/Santiago&#39;,
 &#39;(GMT-03:30) Newfoundland&#39; => &#39;America/St_Johns&#39;,
 &#39;(GMT-03:00) Brasilia&#39; => &#39;America/Sao_Paulo&#39;,
 &#39;(GMT-03:00) Buenos Aires&#39; => &#39;America/Argentina/Buenos_Aires&#39;,
 &#39;(GMT-03:00) Georgetown&#39; => &#39;America/Argentina/Buenos_Aires&#39;,
 &#39;(GMT-03:00) Greenland&#39; => &#39;America/Godthab&#39;,
 &#39;(GMT-02:00) Mid-Atlantic&#39; => &#39;America/Noronha&#39;,
 &#39;(GMT-01:00) Azores&#39; => &#39;Atlantic/Azores&#39;,
 &#39;(GMT-01:00) Cape Verde Is.&#39; => &#39;Atlantic/Cape_Verde&#39;,
 &#39;(GMT) Casablanca&#39; => &#39;Africa/Casablanca&#39;,
 &#39;(GMT) Edinburgh&#39; => &#39;Europe/London&#39;,
 &#39;(GMT) Greenwich Mean Time : Dublin&#39; => &#39;Europe/London&#39;,
 &#39;(GMT) Lisbon&#39; => &#39;Europe/London&#39;,
 &#39;(GMT) London&#39; => &#39;Europe/London&#39;,
 &#39;(GMT) Monrovia&#39; => &#39;Africa/Casablanca&#39;,
 &#39;(GMT+01:00) Amsterdam&#39; => &#39;Europe/Berlin&#39;,
 &#39;(GMT+01:00) Belgrade&#39; => &#39;Europe/Belgrade&#39;,
 &#39;(GMT+01:00) Berlin&#39; => &#39;Europe/Berlin&#39;,
 &#39;(GMT+01:00) Bern&#39; => &#39;Europe/Berlin&#39;,
 &#39;(GMT+01:00) Bratislava&#39; => &#39;Europe/Belgrade&#39;,
 &#39;(GMT+01:00) Brussels&#39; => &#39;Europe/Paris&#39;,
 &#39;(GMT+01:00) Budapest&#39; => &#39;Europe/Belgrade&#39;,
 &#39;(GMT+01:00) Copenhagen&#39; => &#39;Europe/Paris&#39;,
 &#39;(GMT+01:00) Ljubljana&#39; => &#39;Europe/Belgrade&#39;,
 &#39;(GMT+01:00) Madrid&#39; => &#39;Europe/Paris&#39;,
 &#39;(GMT+01:00) Paris&#39; => &#39;Europe/Paris&#39;,
 &#39;(GMT+01:00) Prague&#39; => &#39;Europe/Belgrade&#39;,
 &#39;(GMT+01:00) Rome&#39; => &#39;Europe/Berlin&#39;,
 &#39;(GMT+01:00) Sarajevo&#39; => &#39;Europe/Sarajevo&#39;,
 &#39;(GMT+01:00) Skopje&#39; => &#39;Europe/Sarajevo&#39;,
 &#39;(GMT+01:00) Stockholm&#39; => &#39;Europe/Berlin&#39;,
 &#39;(GMT+01:00) Vienna&#39; => &#39;Europe/Berlin&#39;,
 &#39;(GMT+01:00) Warsaw&#39; => &#39;Europe/Sarajevo&#39;,
 &#39;(GMT+01:00) West Central Africa&#39; => &#39;Africa/Lagos&#39;,
 &#39;(GMT+01:00) Zagreb&#39; => &#39;Europe/Sarajevo&#39;,
 &#39;(GMT+02:00) Athens&#39; => &#39;Europe/Istanbul&#39;,
 &#39;(GMT+02:00) Bucharest&#39; => &#39;Europe/Bucharest&#39;,
 &#39;(GMT+02:00) Cairo&#39; => &#39;Africa/Cairo&#39;,
 &#39;(GMT+02:00) Harare&#39; => &#39;Africa/Johannesburg&#39;,
 &#39;(GMT+02:00) Helsinki&#39; => &#39;Europe/Helsinki&#39;,
 &#39;(GMT+02:00) Istanbul&#39; => &#39;Europe/Istanbul&#39;,
 &#39;(GMT+02:00) Jerusalem&#39; => &#39;Asia/Jerusalem&#39;,
 &#39;(GMT+02:00) Kyiv&#39; => &#39;Europe/Helsinki&#39;,
 &#39;(GMT+02:00) Minsk&#39; => &#39;Europe/Istanbul&#39;,
 &#39;(GMT+02:00) Pretoria&#39; => &#39;Africa/Johannesburg&#39;,
 &#39;(GMT+02:00) Riga&#39; => &#39;Europe/Helsinki&#39;,
 &#39;(GMT+02:00) Sofia&#39; => &#39;Europe/Helsinki&#39;,
 &#39;(GMT+02:00) Tallinn&#39; => &#39;Europe/Helsinki&#39;,
 &#39;(GMT+02:00) Vilnius&#39; => &#39;Europe/Helsinki&#39;,
 &#39;(GMT+03:00) Baghdad&#39; => &#39;Asia/Baghdad&#39;,
 &#39;(GMT+03:00) Kuwait&#39; => &#39;Asia/Riyadh&#39;,
 &#39;(GMT+03:00) Moscow&#39; => &#39;Europe/Moscow&#39;,
 &#39;(GMT+03:00) Nairobi&#39; => &#39;Africa/Nairobi&#39;,
 &#39;(GMT+03:00) Riyadh&#39; => &#39;Asia/Riyadh&#39;,
 &#39;(GMT+03:00) St. Petersburg&#39; => &#39;Europe/Moscow&#39;,
 &#39;(GMT+03:00) Volgograd&#39; => &#39;Europe/Moscow&#39;,
 &#39;(GMT+03:30) Tehran&#39; => &#39;Asia/Tehran&#39;,
 &#39;(GMT+04:00) Abu Dhabi&#39; => &#39;Asia/Muscat&#39;,
 &#39;(GMT+04:00) Baku&#39; => &#39;Asia/Tbilisi&#39;,
 &#39;(GMT+04:00) Muscat&#39; => &#39;Asia/Muscat&#39;,
 &#39;(GMT+04:00) Tbilisi&#39; => &#39;Asia/Tbilisi&#39;,
 &#39;(GMT+04:00) Yerevan&#39; => &#39;Asia/Tbilisi&#39;,
 &#39;(GMT+04:30) Kabul&#39; => &#39;Asia/Kabul&#39;,
 &#39;(GMT+05:00) Ekaterinburg&#39; => &#39;Asia/Yekaterinburg&#39;,
 &#39;(GMT+05:00) Islamabad&#39; => &#39;Asia/Karachi&#39;,
 &#39;(GMT+05:00) Karachi&#39; => &#39;Asia/Karachi&#39;,
 &#39;(GMT+05:00) Tashkent&#39; => &#39;Asia/Karachi&#39;,
 &#39;(GMT+05:30) Chennai&#39; => &#39;Asia/Calcutta&#39;,
 &#39;(GMT+05:30) Kolkata&#39; => &#39;Asia/Calcutta&#39;,
 &#39;(GMT+05:30) Mumbai&#39; => &#39;Asia/Calcutta&#39;,
 &#39;(GMT+05:30) New Delhi&#39; => &#39;Asia/Calcutta&#39;,
 &#39;(GMT+05:45) Kathmandu&#39; => &#39;Asia/Katmandu&#39;,
 &#39;(GMT+06:00) Almaty&#39; => &#39;Asia/Novosibirsk&#39;,
 &#39;(GMT+06:00) Astana&#39; => &#39;Asia/Dhaka&#39;,
 &#39;(GMT+06:00) Dhaka&#39; => &#39;Asia/Dhaka&#39;,
 &#39;(GMT+06:00) Novosibirsk&#39; => &#39;Asia/Novosibirsk&#39;,
 &#39;(GMT+06:00) Sri Jayawardenepura&#39; => &#39;Asia/Colombo&#39;,
 &#39;(GMT+06:30) Rangoon&#39; => &#39;Asia/Rangoon&#39;,
 &#39;(GMT+07:00) Bangkok&#39; => &#39;Asia/Bangkok&#39;,
 &#39;(GMT+07:00) Hanoi&#39; => &#39;Asia/Bangkok&#39;,
 &#39;(GMT+07:00) Jakarta&#39; => &#39;Asia/Bangkok&#39;,
 &#39;(GMT+07:00) Krasnoyarsk&#39; => &#39;Asia/Krasnoyarsk&#39;,
 &#39;(GMT+08:00) Beijing&#39; => &#39;Asia/Hong_Kong&#39;,
 &#39;(GMT+08:00) Chongqing&#39; => &#39;Asia/Hong_Kong&#39;,
 &#39;(GMT+08:00) Hong Kong&#39; => &#39;Asia/Hong_Kong&#39;,
 &#39;(GMT+08:00) Irkutsk&#39; => &#39;Asia/Irkutsk&#39;,
 &#39;(GMT+08:00) Kuala Lumpur&#39; => &#39;Asia/Singapore&#39;,
 &#39;(GMT+08:00) Perth&#39; => &#39;Australia/Perth&#39;,
 &#39;(GMT+08:00) Singapore&#39; => &#39;Asia/Singapore&#39;,
 &#39;(GMT+08:00) Taipei&#39; => &#39;Asia/Taipei&#39;,
 &#39;(GMT+08:00) Ulaan Bataar&#39; => &#39;Asia/Irkutsk&#39;,
 &#39;(GMT+08:00) Urumqi&#39; => &#39;Asia/Hong_Kong&#39;,
 &#39;(GMT+09:00) Osaka&#39; => &#39;Asia/Tokyo&#39;,
 &#39;(GMT+09:00) Sapporo&#39; => &#39;Asia/Tokyo&#39;,
 &#39;(GMT+09:00) Seoul&#39; => &#39;Asia/Seoul&#39;,
 &#39;(GMT+09:00) Tokyo&#39; => &#39;Asia/Tokyo&#39;,
 &#39;(GMT+09:00) Yakutsk&#39; => &#39;Asia/Yakutsk&#39;,
 &#39;(GMT+09:30) Adelaide&#39; => &#39;Australia/Adelaide&#39;,
 &#39;(GMT+09:30) Darwin&#39; => &#39;Australia/Darwin&#39;,
 &#39;(GMT+10:00) Brisbane&#39; => &#39;Australia/Brisbane&#39;,
 &#39;(GMT+10:00) Canberra&#39; => &#39;Australia/Sydney&#39;,
 &#39;(GMT+10:00) Guam&#39; => &#39;Pacific/Guam&#39;,
 &#39;(GMT+10:00) Hobart&#39; => &#39;Australia/Hobart&#39;,
 &#39;(GMT+10:00) Melbourne&#39; => &#39;Australia/Sydney&#39;,
 &#39;(GMT+10:00) Port Moresby&#39; => &#39;Pacific/Guam&#39;,
 &#39;(GMT+10:00) Sydney&#39; => &#39;Australia/Sydney&#39;,
 &#39;(GMT+10:00) Vlapostok&#39; => &#39;Asia/Vlapostok&#39;,
 &#39;(GMT+11:00) Magadan&#39; => &#39;Asia/Magadan&#39;,
 &#39;(GMT+11:00) New Caledonia&#39; => &#39;Asia/Magadan&#39;,
 &#39;(GMT+11:00) Solomon Is.&#39; => &#39;Asia/Magadan&#39;,
 &#39;(GMT+12:00) Auckland&#39; => &#39;Pacific/Auckland&#39;,
 &#39;(GMT+12:00) Fiji&#39; => &#39;Pacific/Fiji&#39;,
 &#39;(GMT+12:00) Kamchatka&#39; => &#39;Pacific/Fiji&#39;,
 &#39;(GMT+12:00) Marshall Is.&#39; => &#39;Pacific/Fiji&#39;,
 &#39;(GMT+12:00) Wellington&#39; => &#39;Pacific/Auckland&#39;,
 &#39;(GMT+13:00) Nuku\&#39;alofa&#39; => &#39;Pacific/Tongatapu&#39;,
);
print_r($timezones);
?>
로그인 후 복사

관련 권장 사항:

PHP 타임스탬프(UNIX) 사용에 대한 자세한 설명

PHP 시간 형식 매개 변수

PHP 시간 및 날짜 도구 별자리/줄기/황도대 징후

위 내용은 모든 시간대의 PHP 출력 목록의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿