DateTimeZone::getOffset
PHP 5 >= 5.2.0, PHP 7, PHP 8
DateTimeZone::getOffset - Returns the timezone offset from GMT
Manual
DateTimeZone::getOffset(
DateTimeInterface$datetime ): public int
Procedural style
inttimezone_offset_get DateTimeZoneobject DateTimeInterfacedatetimeParameters
- object
Procedural style only: A DateTimeZone object returned by timezone_open
- datetime
-
DateTime that contains the date/time to compute the offset from.
Return Values
Returns time zone offset in seconds.
Changelog
Version | Description |
8.0.0 | Prior to this version, false was returned on failure. |