MongoDB connector - add support for DatetimeMS objects
Problem Description
Currently, the MongoDB connector uses the stdlib datetime library to handle datetime objects from the Mongo client. We should expand on this handling to include handling of datetimeMS objects, which is an object that can represent dates that would otherwise be out-of-range for the stdlib datetime library.
See this article here about handling out-of-range datetimes with PyMongo.
Proposed Solution
We should enhance the object serialization of the MongoDB connector to handledatetimeMS objects and not just datetime objects when dealing with dates.
https://github.com/elastic/connectors/blob/ae3f04a2a98f2f3bbea5ada32b65f2a130ef4ac3/connectors/sources/mongo.py#L226-L246
Update: a PR is there, but we haven't heard anything from the customer. We can merge it if we're confident enough it's a solid approach in the PR.