-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
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
datetime.datetime.utcnow() should not have tzinfo #52
Comments
I second this. I have a test testing code including |
adamchainz
added a commit
that referenced
this issue
Aug 29, 2020
adamchainz
added a commit
that referenced
this issue
Aug 29, 2020
adamchainz
added a commit
that referenced
this issue
Aug 29, 2020
Thanks for the report. I've released the fix in version 1.2.1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I find this library very neat and have started using it in multiple tests.
But there is one issue:
time_machine adds a timezone on datetime instances created via
.utcnow()
but this is wrong according to python.It even specifies it directly in the documentation https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow
This change in the behaviour of the datetime library can cause changes in behaviour of the tested code.
Eg. when serialized to a string it adds "+00:00"
The text was updated successfully, but these errors were encountered: