Returns the time zone of the given DateTime object:
<?php$date=date_create(null,timezone_open("Europe/Paris"));$tz=date_timezone_get($date);echo timezone_name_get($tz);?>The date_timezone_get() function returns the time zone of the given DateTime object.
date_timezone_get( object);
| parameter | describe |
|---|---|
| object | Required. Specifies a DateTime object returned by date_create(). |
| Return value: | Returns a DateTimeZone object if successful, or FALSE if failed. |
|---|---|
| PHP version: | 5.2+ |