We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
>>> import bson >>> from bson import json_util >>> from datetime import datetime >>> k = datetime.now() >>> k datetime.datetime(2017, 7, 12, 20, 7, 44, 694669) >>> json_util.dumps(k) '{"$date": 1499890064694}' >>> json_util.loads(json_util.dumps(k)) datetime.datetime(2017, 7, 12, 20, 7, 44, 694000, tzinfo=<bson.tz_util.FixedOffset object at 0x237d750>) >>> j = json_util.loads(json_util.dumps(k)) >>> k ==j Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: can't compare offset-naive and offset-aware datetimes >>>
I think we should respect the datetime as is whether it has timezone or it is naive.
The text was updated successfully, but these errors were encountered:
Nice idea :)
Sorry, something went wrong.
This is for the DATETIME type? Curious about the TIMESTAMP, it looks like this one is a signed 64 bit integer. Should it be unsigned?
No branches or pull requests
I think we should respect the datetime as is whether it has timezone or it is naive.
The text was updated successfully, but these errors were encountered: