Deprecation warnings about datetime.utcnow and datetime.utcfromtimestamp
decaz opened this issue · comments
Marat Sharafutdinov commented
Method datetime.utcnow is deprecated since version 3.12:
DeprecationWarning: datetime.datetime.utcnow()
is deprecated and scheduled for removal in a future version.
Instead, Use timezone-aware objects to represent datetimes in UTC:
datetime.datetime.now(datetime.UTC).
Method datetime.utcfromtimestamp is deprecated since version 3.12:
DeprecationWarning: datetime.datetime.utcfromtimestamp()
is deprecated and scheduled for removal in a future version.
Use timezone-aware objects to represent datetimes in UTC:
datetime.datetime.fromtimestamp(timestamp, datetime.UTC).