Update speedtest.py line 960

❯ speedtest
Retrieving speedtest.net configuration...
/opt/homebrew/bin/speedtest:960: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
  self.timestamp = '%sZ' % datetime.datetime.utcnow().isoformat()
This commit is contained in:
Jose F Oviedo 2024-10-06 22:43:42 -07:00 committed by GitHub
parent 22210ca352
commit 305dce9bd2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -957,7 +957,7 @@ class SpeedtestResults(object):
self.client = client or {}
self._share = None
self.timestamp = '%sZ' % datetime.datetime.utcnow().isoformat()
self.timestamp = '%sZ' % datetime.datetime.now(datetime.UTC).isoformat()
self.bytes_received = 0
self.bytes_sent = 0