|
DateTimeInterface::getTimezoneDateTimeImmutable::getTimezoneDateTime::getTimezonedate_timezone_getReturn time zone relative to given DateTime DescriptionObject-oriented style
public DateTimeZonefalse DateTimeInterface::getTimezone()
public DateTimeZonefalse DateTimeImmutable::getTimezone()
public DateTimeZonefalse DateTime::getTimezone()
Procedural style DateTimeZonefalse date_timezone_get(DateTimeInterface
$object)Return time zone relative to given DateTime. Parameters
Return Values
Returns a DateTimeZone object on success
or Errors/ExceptionsThrows a DateObjectError if the object has not been correctly initialized, for example when the constructor of a child class does not call the parent constructor. Changelog
ExamplesExample #1 DateTime::getTimezone example Object-oriented style The above example will output: Europe/London Procedural style The above example will output: Europe/London See Also
|