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

Function _max_datetime_ms

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

Source from the content-addressed store, hash-verified

137
138
139def _max_datetime_ms(tz: datetime.tzinfo = utc) -> int:
140 delta = tz.utcoffset(_MAX_UTC)
141 if delta is not None:
142 offset_millis = (delta.days * 86400 + delta.seconds) * 1000 + delta.microseconds // 1000
143 else:
144 offset_millis = 0
145 return min(_MAX_UTC_MS, _MAX_UTC_MS - offset_millis)
146
147
148def _millis_to_datetime(

Callers 1

_millis_to_datetimeFunction · 0.85

Calls 1

utcoffsetMethod · 0.45

Tested by

no test coverage detected