-
Notifications
You must be signed in to change notification settings - Fork 876
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
[Dev] datetime.datetime.utcnow()
deprecated and replacement breaks strptime
#3791
Comments
Thanks for the fix @janosh, the Windows tests failing in CI is due to a matplotlib issue 628f737, but that PR #3887 would need some extra time to be reviewed. Perhaps you could fix that directly on master? Meanwhile it looks like one unit test for import datetime
print(datetime.datetime.utcnow()) >>> 2024-08-04 12:55:17.167352
print(datetime.datetime.now(tz=datetime.timezone.utc)) >>> 2024-08-04 12:55:17.167478+00:00 |
thanks, good call! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
datetime.datetime.utcnow()
deprecatedSee discussion in #3705 (comment),
datetime.datetime.utcnow()
is marked as deprecated and might be removed after Python 3.12.The same issue has been reported to
monty
as well: materialsvirtuallab/monty#275.But the new replacement returns slightly different output (an additional timezone info
+00:00
at the end), which breaksstrptime
:Raises:
The text was updated successfully, but these errors were encountered: