Hi there,
I feel this is related to #470, but has another focus.
ISO8601 generally allows to drop the least-significant components of the time specification. Consequently DateTime can parse
julia> dt=DateTime("2026-01-20T09:00",dateformat"yyyy-mm-dd\THH:MM:SS")
2026-01-20T09:00:00
where the seconds are left out although they are specified. DateTime adds zeros here.
I would love ZonedDateTime to do the same, but
julia> zdt=ZonedDateTime("2026-01-20T09:00+01:00",dateformat"yyyy-mm-dd\THH:MM:SSzzz")
ERROR: ArgumentError: Unable to parse string "2026-01-20T09:00+01:00" using format dateformat"yyyy-mm-dd\THH:MM:SSzzz". Unable to parse date time. Expected directive Delim(:) at char 17
Stacktrace: ...
For millis it's nearly the same story, because DateTime omits them in the output if zero instead of adding zeros:
julia> dt=DateTime("2026-01-20T09:00",dateformat"yyyy-mm-dd\THH:MM:SS.sss")
2026-01-20T09:00:00
So aside from better ISO 8601 compliance, maybe it could fix #470, if ZonedDateTime would allow dropping the least-significant parts.
Sincerly yours
Para7etamol