utcoffset
Return the current offset to UTC in hours.
def utcoffset(
time: ModuleType = _time,
localtime: Callable[..., _time.struct_time] = _time.localtime
) - > float
Return the current offset to UTC in hours.
Parameters
| Name | Type | Description |
|---|---|---|
| time | ModuleType = _time | The time module used to access timezone and altzone constants. |
| localtime | Callable[..., _time.struct_time] = _time.localtime | A function that returns a struct_time object used to determine if daylight saving time is currently active. |
Returns
| Type | Description |
|---|---|
float | The number of hours offset from UTC, adjusted for daylight saving time if applicable. |