DateTime.getTimeZoneOffset

Retrieves the offset from UTC in hours that the timezone specified by @datetime represents. Timezones ahead (to the east) of UTC have positive values, timezones before (to the west) of UTC have negative values. If @datetime represents UTC time, then the offset is zero.

class DateTime
float
getTimeZoneOffset
()

Return Value

Type: float

the offset from UTC in hours

Meta