(zt)
| 136 | ranges = [v1_range, v2_range] |
| 137 | |
| 138 | def zt_as_tuple(zt): |
| 139 | # zt may be a tuple (timestamp, offset_before, offset_after) or |
| 140 | # a ZoneTransition object -- this is to allow the timestamp to be |
| 141 | # values that are outside the valid range for datetimes but still |
| 142 | # valid 64-bit timestamps. |
| 143 | if isinstance(zt, tuple): |
| 144 | return zt |
| 145 | |
| 146 | if zt.transition: |
| 147 | trans_time = int(datetime.timestamp(zt.transition_utc)) |
| 148 | else: |
| 149 | trans_time = None |
| 150 | |
| 151 | return (trans_time, zt.offset_before, zt.offset_after) |
| 152 | |
| 153 | transitions = sorted(map(zt_as_tuple, transitions), key=lambda x: x[0]) |
| 154 |
nothing calls this directly
no outgoing calls
no test coverage detected