MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / _min_datetime_ms

Function _min_datetime_ms

bson/datetime_ms.py:130–136  ·  view source on GitHub ↗
(tz: datetime.tzinfo = utc)

Source from the content-addressed store, hash-verified

128
129# Inclusive min and max for timezones.
130def _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
139def _max_datetime_ms(tz: datetime.tzinfo = utc) -> int:

Callers 1

_millis_to_datetimeFunction · 0.85

Calls 1

utcoffsetMethod · 0.45

Tested by

no test coverage detected