HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

timezone_name_get

Description

The timezone_name_get of Date / Time for PHP returns the name of the timezone.

Syntax

timezone_name_get(
    DateTimeZone $object
): string

Parameters

object

The DateTimeZone for which to get a name.

Return

Depending on zone type, UTC offset (type 1), timezone abbreviation (type 2), and timezone identifiers as published in the IANA timezone database (type 3), the descriptor string to create a new DateTimeZone object with the same offset and/or rules.

Examples

1 · object

<?

$date = date_create();

$object = date_timezone_get($date);

$return = timezone_name_get($object);

echo $return;
UTC