-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Use timezone-aware datetime.datetime.now() #805
Open
4n3w
wants to merge
1
commit into
sivel:master
Choose a base branch
from
4n3w:fix_datetime_utcnow_deprecation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…etime.datetime.now()
kovyrin
approved these changes
Jun 27, 2024
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.
Tested it in my environment and it works
Works for me too ➜ ~ curl https://raw.githubusercontent.com/4n3w/speedtest-cli/fix_datetime_utcnow_deprecation/speedtest.py | python3
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 65352 100 65352 0 0 263k 0 --:--:-- --:--:-- --:--:-- 263k
Retrieving speedtest.net configuration...
Testing from Spectrum (a.b.c.d)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Airlink Internet Inc (Los Angeles, CA) [167.30 km]: 20.176 ms
Testing download speed................................................................................
Download: 196.26 Mbit/s
Testing upload speed......................................................................................................
Upload: 10.62 Mbit/s |
I guess someone with write access would have to merge this, summoning @sivel |
zdods
approved these changes
Sep 20, 2024
Really?
…On Sat, 8 Feb 2025, 3:22 am Teodor Daskalov, ***@***.***> wrote:
hey guys, just FYI this is still a thing:
image.png (view on web)
<https://github.com/user-attachments/assets/04399604-3804-4e85-961f-6c402c32075d>
—
Reply to this email directly, view it on GitHub
<#805 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWTMNNRM7WUC3ZQ4JYBM3O32OWWB3AVCNFSM6AAAAABGE2F4MGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBUGU2TSOJVGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replace deprecated datetime.datetime.utcnow() with timezone-aware datetime.datetime.now()
This change addresses a deprecation warning for python 3.12 by using datetime.datetime.now() with datetime.timezone.utc, ensuring the timestamp remains in UTC and conforms to newer best practices.