Skip to content
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

Avoid use of the deprectated utcnow datetime method #12007

Closed
wants to merge 2 commits into from

Conversation

pfmoore
Copy link
Member

@pfmoore pfmoore commented Apr 30, 2023

No description provided.

@notatallshaw
Copy link
Member

notatallshaw commented Apr 30, 2023

How come this PRs over #12006 ?

Also is current_time = datetime.datetime.now(datetime.timezone(datetime.timedelta(0))) really a recommended way to do this? I assumed the correct way is current_time = datetime.datetime.now(datetime.timezone.utc)?

Edit: I think you've answered my questions in #12005 (comment)

@pfmoore
Copy link
Member Author

pfmoore commented Apr 30, 2023

My bad, I didn't see #12006 before I put this together. And yes, datetime.timezone.utc is much better, I just wasn't aware of it.

@pfmoore pfmoore closed this Apr 30, 2023
@pfmoore pfmoore deleted the utcnow branch April 30, 2023 21:54
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants