DateTime::getTimezoneDateTimeImmutable::getTimezoneDateTimeInterface::getTimezonedate_timezone_getReturn time zone relative to given DateTime DescriptionObject oriented style
public DateTimeZone DateTime::getTimezone
( void
)
public DateTimeZone DateTimeImmutable::getTimezone
( void
)
public DateTimeZone DateTimeInterface::getTimezone
( void
)
Procedural style
DateTimeZone date_timezone_get
( DateTimeInterface
$object
)Return time zone relative to given DateTime. Parameters
Return Values
Returns a DateTimeZone object on success
or ExamplesExample #1 DateTime::getTimezone example Object oriented style
<?php Procedural style
<?php The above examples will output: Europe/London See Also
|