(tz: datetime.tzinfo = utc)
| 128 | |
| 129 | # Inclusive min and max for timezones. |
| 130 | def _min_datetime_ms(tz: datetime.tzinfo = utc) -> int: |
| 131 | delta = tz.utcoffset(_MIN_UTC) |
| 132 | if delta is not None: |
| 133 | offset_millis = (delta.days * 86400 + delta.seconds) * 1000 + delta.microseconds // 1000 |
| 134 | else: |
| 135 | offset_millis = 0 |
| 136 | return max(_MIN_UTC_MS, _MIN_UTC_MS - offset_millis) |
| 137 | |
| 138 | |
| 139 | def _max_datetime_ms(tz: datetime.tzinfo = utc) -> int: |
no test coverage detected