DateTimeZone::getLocation

timezone_location_get

Returns location information for a timezone

&reftitle.description;

&style.oop;

public ``array``false```DateTimeZone::getLocation`

&style.procedural;

``array``false```timezone_location_get` `DateTimeZone` `object`

Returns location information for a timezone, including country code, latitude/longitude and comments.

&reftitle.parameters;

&date.datetimezone.description;
&reftitle.returnvalues;

Array containing location information about timezone&return.falseforfailure;.

&reftitle.examples;

### `DateTimeZone::getLocation` example

    <?php
    $tz = new DateTimeZone("Europe/Prague");
    print_r($tz->getLocation());
    print_r(timezone_location_get($tz));
    ?>

&example.outputs;

    Array
    (
        [country_code] => CZ
        [latitude] => 50.08333
        [longitude] => 14.43333
        [comments] =>
    )
    Array
    (
        [country_code] => CZ
        [latitude] => 50.08333
        [longitude] => 14.43333
        [comments] =>
    )

&reftitle.seealso;

- `DateTimeZone::listIdentifiers` to get a full or partial list of all supported timezone identifiers