PHP timezone_name_get() Function

Definition

The timezone_name_get() returns the name of the timezone.

Syntax

PHP timezone_name_get() Function has the following syntax.

timezone_name_get(object)

Parameter

PHP timezone_name_get() Function has the following parameter

  • object - Required. DateTimeZone object

Return

PHP timezone_name_get() Function returns a timezone name from the list of timezones.

Example

Return the name of the timezone:


<?php
    $tz=timezone_open("Europe/Paris");
    echo timezone_name_get($tz);
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions