PHP timezone_identifiers_list() 函数

PHP 教程 · 2019-01-24 10:11:37

实例

输出非洲的所有时区:

<?php
print_r(timezone_identifiers_list(1));
?>

定义和用法

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

语法

timezone_identifiers_list(what,country);

参数 描述
what 可选。规定一个 DateTimeZone 类常量

1 = AFRICA
2 = AMERICA
4 = ANTARCTICA
8 = ARCTIC
16 = ASIA
32 = ATLANTIC
64 = AUSTRALIA
128 = EUROPE
256 = INDIAN
512 = PACIFIC
1024 = UTC
2047 = ALL
4095 = ALL_WITH_BC
4096 = PER_COUNTRY
country 可选。规定两个字母的 ISO 3166-1 兼容的国家代码。

技术细节

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

点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

The Art of Computer Programming, Volume 3

The Art of Computer Programming, Volume 3

Donald E. Knuth / Addison-Wesley Professional / 1998-05-04 / USD 74.99

Finally, after a wait of more than thirty-five years, the first part of Volume 4 is at last ready for publication. Check out the boxed set that brings together Volumes 1 - 4A in one elegant case, and ......一起来看看 《The Art of Computer Programming, Volume 3》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具