Open this example in the interactive library
Source code
from datetime import datetime
print(datetime.fromisoformat('2026-01-02T03:04:05Z'))Sample output
2026-01-02 03:04:05+00:00

Open this example in the interactive library
from datetime import datetime
print(datetime.fromisoformat('2026-01-02T03:04:05Z'))2026-01-02 03:04:05+00:00