The timezone_identifiers_list() returns an indexed array containing all timezone identifiers.
PHP timezone_identifiers_list() Function has the following syntax.
timezone_identifiers_list(timezoneClassConstant,country);
Parameter | Is Required | Description |
---|---|---|
timezoneClassConstant | Optional. | DateTimeZone class constant |
country | Optional. | Two-letter ISO 3166-1 compatible country code |
Possible values for timezoneClassConstant
PHP timezone_identifiers_list() Function returns an indexed array on success. FALSE on failure.
Print all timezones in Africa
<?php
print_r(timezone_identifiers_list(1));
?>
The code above generates the following result.