Return a Timezone instance given its offset in seconds.
(offset: int)
| 24 | |
| 25 | |
| 26 | def fixed_timezone(offset: int) -> FixedTimezone: |
| 27 | """ |
| 28 | Return a Timezone instance given its offset in seconds. |
| 29 | """ |
| 30 | if offset in _tz_cache: |
| 31 | return _tz_cache[offset] |
| 32 | |
| 33 | tz = FixedTimezone(offset) |
| 34 | _tz_cache[offset] = tz |
| 35 | |
| 36 | return tz |
| 37 | |
| 38 | |
| 39 | def local_timezone() -> Timezone | FixedTimezone: |
searching dependent graphs…