Y
Hacker News
new
|
ask
|
show
|
jobs
by
jessekv
424 days ago
I recently learned that there is datetime.UTC which is an alias of datetime.timezone.utc
It helps a bit with the verbosity:
from datetime import datetime, UTC
datetime.now(UTC)
1 comments
maleldil
424 days ago
That's from 3.11 onwards.
link