Open this example in the interactive library
Source code
from datetime import datetime, timezone
print(datetime(2026, 10, 22, 12, tzinfo=timezone.utc).isoformat())Sample output
2026-10-22T12:00:00+00:00

Create a UTC timestamp. A self-contained example using the Python standard library.
Open this example in the interactive library
from datetime import datetime, timezone
print(datetime(2026, 10, 22, 12, tzinfo=timezone.utc).isoformat())2026-10-22T12:00:00+00:00