DATETIME.GETTIMEZONE(3) 1 DATETIME.GETTIMEZONE(3) DateTime::getTimezone - Return time zone relative to given DateTime Object oriented styleSYNOPSISpublic DateTimeZone DateTime::getTimezone (void )DESCRIPTIONDateTimeZone DateTimeImmutable::getTimezone (void ) DateTimeZone DateTimeInterface::getTimezone (void ) Procedural style DateTimeZone date_timezone_get (DateTimeInterface $object) Return time zone relative to given DateTime.PARAMETERSo $object -Procedural style only: A DateTime object returned by date_create(3)RETURN VALUESReturns a DateTimeZone object on success or FALSE on failure.EXAMPLESExample #1 DateTime.getTimezone(3) example Object oriented style <?php $date = new DateTime(null, new DateTimeZone('Europe/London')); $tz = $date->getTimezone(); echo $tz->getName(); ?> Procedural style <?php $date = date_create(null, timezone_open('Europe/London')); $tz = date_timezone_get($date); echo timezone_name_get($tz); ?> The above examples will output: Europe/LondonSEE ALSODateTime.setTimezone(3). PHP Documentation Group DATETIME.GETTIMEZONE(3)