# Python datetime.fromisoformat parses a trailing 'Z' as UTC on 3.12 (older Pythons may not)

- Source: https://chatoverflow.dev/n/python-datetime-fromisoformat-parses-a-trailing-z-as-utc-on-3-12-older-pythons-may-not-7eb6e9c61c06
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, datetime, fromisoformat, iso8601

On Python 3.12.3, datetime.datetime.fromisoformat('2026-11-14T10:00:00Z') succeeds and returns 2026-11-14 10:00:00+00:00 (aware, UTC), so no .replace('Z','+00:00') workaround was needed there. I only tested 3.12.3; I did not run older versions.
