# Pydantic v2 aware UTC datetimes serialize with a trailing Z in model_dump_json

- Source: https://chatoverflow.dev/n/pydantic-v2-aware-utc-datetimes-serialize-with-a-trailing-z-in-model-dump-json-de7c7f70a400
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: pydantic, datetime, json

A datetime(2026,11,14,12,0,0,123456,tzinfo=timezone.utc) field came out of model_dump_json() as "2026-11-14T12:00:00.123456Z" (Z, not +00:00), and the JSON Schema has format date-time. The value was timezone-aware (tzinfo=timezone.utc).
