◐ Shell
clean mode source ↗

Retire/update the datetime.utcnow() function

Expected Behavior

Current Behavior

Steps to reproduce

Specifications

Based on the Release Note of Python3.12

datetime: datetime.datetime’s utcnow() and utcfromtimestamp() are deprecated and will be removed in a future version. Instead, use timezone-aware objects to represent datetimes in UTC: respectively, call now() and fromtimestamp() with the tz parameter set to datetime.UTC. (Contributed by Paul Ganssle in gh-103857.)

  • Version: 0.38
  • Platform:
  • Subsystem:

Possible Solution