Return the current offset to UTC in hours.
(
time: ModuleType = _time,
localtime: Callable[..., _time.struct_time] = _time.localtime)
| 431 | |
| 432 | |
| 433 | def utcoffset( |
| 434 | time: ModuleType = _time, |
| 435 | localtime: Callable[..., _time.struct_time] = _time.localtime) -> float: |
| 436 | """Return the current offset to UTC in hours.""" |
| 437 | if localtime().tm_isdst: |
| 438 | return time.altzone // 3600 |
| 439 | return time.timezone // 3600 |
| 440 | |
| 441 | |
| 442 | def adjust_timestamp(ts: float, offset: int, |
no outgoing calls