DateTime::getOffset
PHP 5 >= 5.2.1, PHP 7, PHP 8
DateTime::getOffset - Returns the timezone offset
Manual
DateTime::getOffset(
): public int
public intDateTimeImmutable::getOffset
Parameters
- object
Procedural style only: A DateTime object returned by date_create
Return Values
Returns the timezone offset in seconds from UTC on success.
Changelog
Version | Description |
8.0.0 | Prior to this version, false was returned on failure. |