Latest web development tutorials

PHP timezone_identifiers_list () function

PHP Date / Time PHP Date / Time Reference Manual

Examples

The output of all of Africa time zone:

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

Running instance »

Definition and Usage

timezone_identifiers_list () Returns the value of an array with all timezone identifier.

grammar

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 兼容的国家代码。

technical details

return value: Success, returns an array of values, then failed to return FALSE.
PHP version: 5.2+
Update log: PHP 5.3: Added the optional what and country parameters.


PHP Date / Time PHP Date / Time Reference Manual