-
Notifications
You must be signed in to change notification settings - Fork 5
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
Replace datetime.utcnow #215
Conversation
Codecov Report
@@ Coverage Diff @@
## main #215 +/- ##
=======================================
Coverage 96.76% 96.76%
=======================================
Files 44 44
Lines 2655 2655
=======================================
Hits 2569 2569
Misses 86 86
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Similar to my comment on the home assistant PR, I think its more helpful to continue to use the deprecated method given the guidance |
🤔 I would say it depends. The main change left would be to remove In the end adding a
Not yet, AFAIK |
Yeah, i think its a larger change -- not necessarily expecting you to make it. date-times in this library are a beast. I think the existing use of this may result in unintended behavior -- a date without a timezone is assumed to be as floating in the local timezone. So this is actually a good thing to fix, since its not expected its actually utc. |
Thought that might be the case. I'm going to close this PR then. |
Starting with Python 3.12
datetime.utcnow
will be deprecated.https://docs.python.org/3.12/library/datetime.html#datetime.datetime.utcnow