Home Tutorial Php Phpdate timezone_location_get


Share on Google+Share on Google+
Posted on: August 29, 2009 at 12:00 AM
This is the example of timezone_location_get function used for returning location information of the timezone.

timezone_location_get() Function in PHP

timezone_location_get alias DateTimeZone::getLocation returns location information for a timezone including country code, latitude/longitude and comments.

Syntax of timezone_location_get() Function in PHP

public array DateTimeZone::getLocation ( void )

Parameters of timezone_location_get() Function in PHP

This function has no parameters.

Return Values

Array containing location information about timezone.

Example on timezone_location_get() Function in PHP:


$tz = new DateTimeZone("India/Kolkata");

The above example will output:

[country_code] => India
[latitude] => 28.61 N
[longitude] => 77.23 E
[comments] => 


Related Tags for timezone_location_get:

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