speedtest-cli icon indicating copy to clipboard operation
speedtest-cli copied to clipboard

change .utcnow() to .now(datetime.UTC) (deprecated)

Open MGMCN opened this issue 2 years ago • 2 comments

When i run command speedtest-cli on my MacBook(Sonoma14.1.1) with Python3.12.

❯ speedtest-cli
Retrieving speedtest.net configuration...
/opt/homebrew/bin/speedtest-cli: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 method will be deprecated in future versions of python-datetime and it is recommended to change it now. Thank you.

MGMCN avatar Nov 18 '23 05:11 MGMCN

@sivel I would appreciate it if you could review this small change.

MGMCN avatar Nov 18 '23 05:11 MGMCN