PyMongo's bson module automatically decodes the bson UTC datetime type into a Python datetime. This is problematic because Python's datetimes have a stricter range of possible values and can lead to InvalidBSON errors when decoding a technically valid bson type, eg PYTHON-1822.
We could avoid this class of decoding errors by offering a new date representation that stores the bson UTC datetime's int64 offset without decoding it into a datetme.
- causes
-
SERVER-43055 Prevent an exception from being thrown when gdb prints a BSONObj with datetimes beyond datetime.MAXYEAR
- Closed
-
PYTHON-4885 Legacy extended json encoding of DatetimeMS is incorrect
- Closed
- is duplicated by
-
PYTHON-2656 Mongodb allows storing negative Dates, but pymongo cannot parse this value.
- Closed
- is related to
-
PYTHON-1822 Test failure - Database.current_op fails decoding a UTC datetime
- Closed
-
PYTHON-3398 Benchmark datetime decoding performance
- Closed
-
PYTHON-3392 Change default datetime_conversion to DATETIME_AUTO
- Backlog