PHP | timezone_identifiers_list() Function Last Updated : 20 Aug, 2018 Summarize Comments Improve Suggest changes Share Like Article Like Report The timezone_identifiers_list() function is an inbuilt function in PHP which is used to return an indexed array containing all the timezone identifiers. The datetimezone object is sent as a parameter to the timezone_identifiers_list() function and it returns an indexed array on success or False on failure. Syntax: array timezone_identifiers_list( $datetimezone, $country ) Parameters: This function accepts two parameter as mentioned above and described below: $datetimezone: It is an optional parameter which specifies the DateTimeZone class constant. country: It is also an optional parameter which specifies a two-letter ISO 3166-1 compatible country code. Return Value: This function returns an indexed array on success or False on failure. Exceptions: The timezone_identifiers_list() function is an alias of DateTimeZone::listIdentifiers() function. Below programs illustrate the timezone_identifiers_list() function in PHP: Program 1: php <?php // Displaying all the timezone identifiers of Antarctica echo ("All the timezones available in this timezone are "); print_r(timezone_identifiers_list(4)); ?> Output: All the timezones available in this timezone are Array ( [0] => Antarctica/Casey [1] => Antarctica/Davis [2] => Antarctica/DumontDUrville [3] => Antarctica/Macquarie [4] => Antarctica/Mawson [5] => Antarctica/McMurdo [6] => Antarctica/Palmer [7] => Antarctica/Rothera [8] => Antarctica/Syowa [9] => Antarctica/Troll [10] => Antarctica/Vostok ) Program 2: php <?php // Displaying the timezone identifiers of Africa $timezone_identifiers = DateTimeZone::listIdentifiers(); for ($i = 0; $i < 8; $i++) { echo "$timezone_identifiers[$i]\n"; } ?> Output: Africa/Abidjan Africa/Accra Africa/Addis_Ababa Africa/Algiers Africa/Asmara Africa/Bamako Africa/Bangui Africa/Banjul Related Articles: PHP | timezone_offset_get() Function PHP | timezone_name_from_abbr() Function PHP | timezone_version_get() Function Reference: http://php.net/manual/en/function.timezone-identifiers-list.php Comment More infoAdvertise with us Next Article PHP | IntlCalendar setTimeZone() Function S Shubrodeep Banerjee Follow Improve Article Tags : Misc Web Technologies PHP PHP-date-time PHP-function +1 More Practice Tags : Misc Similar Reads PHP | timezone_offset_get() Function The timezone_offset_get() function is an inbuilt function in PHP which is used to return the timezone offset from GMT. The date time object and the date-time are sent as a parameter to the timezone_offset_get() function and return the timezone offset in seconds on success or False on failure. Syntax 2 min read PHP | timezone_location_get() Function The timezone_location_get() function is an inbuilt function in PHP which is used to return the location information for the given timezone. The date time object is sent as a parameter to the timezone_location_get() function and it returns location information related to the timezone on success or Fa 2 min read PHP | timezone_open() Function The timezone_open() function is an inbuilt function in PHP which is used to create a new DateTimeZone object. The timezone_open() function accepts the timezone as a parameter and returns the DateTimeZone object on success or False on failure. Syntax: timezone_open( $timezone ) Parameters: This funct 2 min read PHP | timezone_name_get() Function The timezone_name_get() function is an inbuilt function in PHP which is used to return the name of the timezone. The date time object is sent as a parameter to the timezone_name_get() function and it returns the name of the timezone on success or False on failure. Syntax: string timezone_name_get( $ 2 min read PHP | IntlCalendar setTimeZone() Function The IntlCalendar::setTimeZone() function is an inbuilt function in PHP which is used to set the new timezone for this calendar. The time is represented in terms of object and it preserves to the detriment of the timezone field values. Syntax: Object oriented style bool IntlCalendar::setTimeZone( mix 2 min read PHP | date_timezone_get() Function The date_timezone_get() function is an inbuilt function in PHP which is used to return time zone relative to given DateTime. This function returns a DateTimeZone object on success or False on failure. Syntax: Procedural style: date_timezone_get( $object ) Object oriented style: DateTime::getTimezone 1 min read Like