Home Tutorial Php Phpdate timezone_identifiers_list


Share on Google+Share on Google+
Posted on: August 29, 2009 at 12:00 AM
The following example is about timezone_identifier_list function used for returning timezone identifiers.

PHP timezone_identifiers_list() Function

timezone_identifiers_list alias DateTimeZone::list Identifiers function returns numerically index array with all timezone identifiers

Description on PHP Timezone Identifier List

staticarray DateTimeZone::listIdentifiers ([ int $what = DateTime::ALL [, string $country = NULL ]] )
array timezone_identifiers_list ([ int $what = DateTime::ALL [, string $country = NULL ]] )

Parameters of timezone_identifiers_list() Function PHP

what - One of DateTimeZone class constants, defaults to DateTimeZone::ALL.

country - A two-letter ISO 3166-1 compatible country code.

(The parameter option country is only used when what is set to DateTimeZone::PER_COUNTRY.)

Return Values

Returns array on success or FALSE on failure.

Examples of timezone_identifiers_list() Function PHP


$timezone_identifiers = DateTimeZone::listIdentifiers();
for ($i=0; $i < 5; $i++) {
echo "$timezone_identifiers[$i]\n";



Related Tags for timezone_identifiers_list:

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: August 29, 2009

Recommend the tutorial

Advertisements Advertisements