Menu Home

timezone_name_get

osbo.com | PHP | Functions | timezone_name_get

Returns the name of the timezone

Syntax

timezone_name_get ( DateTimeZone $object ) : string

Parameters

object

The DateTimeZone for which to get a name.

Return

One of the timezone names in the list of timezones.

Examples

<?

$date = date_create();

$object = date_timezone_get($date);

$return = timezone_name_get($object);

echo $return;

?>
UTC

PHP