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

Function _get_date

bson/__init__.py:434–438  ·  view source on GitHub ↗

Decode a BSON datetime to python datetime.datetime.

(
    data: Any, _view: Any, position: int, dummy0: int, opts: CodecOptions[Any], dummy1: Any
)

Source from the content-addressed store, hash-verified

432
433
434def _get_date(
435 data: Any, _view: Any, position: int, dummy0: int, opts: CodecOptions[Any], dummy1: Any
436) -> Tuple[Union[datetime.datetime, DatetimeMS], int]:
437 """Decode a BSON datetime to python datetime.datetime."""
438 return _millis_to_datetime(_UNPACK_LONG_FROM(data, position)[0], opts), position + 8
439
440
441def _get_code(

Callers

nothing calls this directly

Calls 1

_millis_to_datetimeFunction · 0.90

Tested by

no test coverage detected