3 ms·
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
by jessekv 1y 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)
- maleldil 1y agoThat's from 3.11 onwards.
- deleted 1y ago[deleted]