Share on Google+Share on Google+

timezone_identifiers_list

Advertisement
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

<?php

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

?>

Advertisements

Advertisement

Posted on: August 29, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial 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.