diff --git a/CHANGES.md b/CHANGES.md index 2cad8c2..0d4d135 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ ## Unreleased - MongoDB: Rename columns with leading underscores to use double leading underscores - MongoDB: Add support for UUID types +- MongoDB: Improve reading timestamps in previous BSON formats ## 2024/09/02 v0.0.21 - DynamoDB: Add special decoding for varied lists. diff --git a/cratedb_toolkit/io/mongodb/core.py b/cratedb_toolkit/io/mongodb/core.py index 7e1744e..5a34207 100644 --- a/cratedb_toolkit/io/mongodb/core.py +++ b/cratedb_toolkit/io/mongodb/core.py @@ -57,7 +57,7 @@ def gather_collections(database) -> t.List[str]: def get_mongodb_client_database(args, **kwargs) -> t.Tuple[pymongo.MongoClient, pymongo.database.Database]: client: pymongo.MongoClient - client = pymongo.MongoClient(args.url, **kwargs) + client = pymongo.MongoClient(args.url, datetime_conversion="DATETIME_AUTO", **kwargs) db: pymongo.database.Database = client.get_database(args.database) return client, db