Prefer timezone-aware datetimes to utcnow()

Python pattern

To get the current time in UTC use a datetime object with the timezone explicitly set to UTC.

Aware date-time for UTC

BEFORE
from datetime import datetime

this_moment_utc = datetime.utcnow()
AFTER
from datetime import datetime, timezone

this_moment_utc = datetime.now(timezone.utc)