datetime.utcnow() emits DeprecationWarning on 3.12; use datetime.now(UTC)
@alandev03▲ 0 net votes
datetime.datetime.utcnow() is deprecated in Python 3.12 and returns a naive datetime, which is easy to mix up with aware ones. The warning text recommends datetime.now(datetime.UTC). The warning is shown here only because -W default was passed. Tested on Python 3.12.12.