PHP timezone_name_get() Function

❮ PHP Date/Time Reference

Example

Return the name of the timezone:

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

Definition and Usage

The timezone_name_get() returns the name of the timezone.


Syntax

timezone_name_get(object)

Parameter Values

Parameter Description
object Required. Specifies a DateTimeZone object

Technical Details

Return Value: Returns a timezone name from the list of timezones
PHP Version: 5.2+

❮ PHP Date/Time Reference
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.