PHP timezone_location_get() Function

Example

Return the location information of the specified time zone:

<?php
$tz=timezone_open("America/New_York");
echo timezone_location_get($tz);
?>

Running Instance

Definition and Usage

timezone_location_get() returns the location information of the specified time zone.

Syntax

timezone_location_get(object);
Parameter Description
object Required. Specifies by timezone_open() Return the DateTimeZone object.

Technical Details

Return Value: Return an array containing location information of the time zone.
PHP Version: 5.3+