timezone_identifiers_list()

本页内容

PHP timezone_identifiers_list() 函数

Category:PHP Date 参考手册

输出非洲的所有时区:


示例

<?php

    print_r(timezone_identifiers_list(1));
?>

定义和用法

timezone_identifiers_list() 返回带有所有时区标识符的数值数组。

语法

    timezone_identifiers_list(what,country);
参数 描述
what 可选。规定一个 DateTimeZone 类常量1 = AFRICA2 = AMERICA4 = ANTARCTICA8 = ARCTIC16 = ASIA32 = ATLANTIC 64 = AUSTRALIA128 = EUROPE256 = INDIAN512 = PACIFIC1024 = UTC2047 = ALL4095 = ALL_WITH_BC4096 = PER_COUNTRY
country 可选。规定两个字母的 ISO 3166-1 兼容的国家代码。

技术细节

返回值: 成功则返回一个数值数组,失败则返回 FALSE。
PHP 版本: 5.2+
更新日志: PHP 5.3:新增可选的 what 和 country 参数。

Category:PHP Date 参考手册

此页面最后编辑于2022年8月17日 (星期三) 22:14。