-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
♻️ Replace deprecated utcnow() with now(timezone.utc) in utils module #1247
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
Conversation
|
You could change it in backend/app/core/security.py too. |
|
Thanks for the heads up @PierrickLP |
|
@alejsdev will we merge this? |
GDemay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my search, there is no more utcnow() after your change. Sounds good!
Nice job ;)
tiangolo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 🚀
|
Hi @jalvarezz13, thanks for your contribution! and thanks to everyone for the help 🤓 |
…s module (fastapi#1247)" This reverts commit 6e1c888.
…y.py This reverts the datetime.now(timezone.utc) change back to datetime.utcnow() for E2E testing purposes.
This reverts the datetime.now(timezone.utc) change back to datetime.utcnow() for E2E testing purposes.
This pull request addresses the deprecation of the datetime.utcnow() function by replacing it with datetime.now(timezone.utc) in the utils module.
Before
After
Source: https://docs-python-org.translate.goog/3/library/datetime.html?_x_tr_sl=en&_x_tr_tl=es&_x_tr_hl=es&_x_tr_pto=sc#datetime.datetime.utcnow