所支持的时区列表

Table of Contents

在这你可找到 PHP 所支持的所有时区的列表,可用于诸如 date_default_timezone_set() 等函数。

Note: 最新版的时区数据库可从 PECL 的 » timezonedb 进行安装。

Note: 基于时区数据库版本的列表 2018.5.

add a note add a note

User Contributed Notes 4 notes

up
0
Anonymous
4 months ago
From PECL's timezonedb package.xml:
  The data that this extension uses comes from the "Olson" database, which is
located at http://www.iana.org/time-zones.

The timezone database is also the one used by the Intl extention.
See: http://userguide.icu-project.org/datetime/timezone
up
-132
onomame
1 year ago
Get a list of Timezones.

<?php
foreach(timezone_abbreviations_list() as $abbr => $timezone){
        foreach(
$timezone as $val){
                if(isset(
$val['timezone_id'])){
                       
var_dump($abbr,$val['timezone_id']);
                }
        }
}
?>
up
-180
braindead
1 year ago
Just use DateTimeZone::listIdentifiers()
To Top