ZonedDateTime fails to parse the <time> tag if milliseconds are present. However, the millisecond field seems to be optional in the GPX Time/Date standard. Unfortunately, Dates.jl (and TimeZones.jl) does not support optional field arguments (See JuliaTime/TimeZones.jl/issues/83).
To following example illiustrates the issue:
julia> using Dates, TimeZones
julia> s = "2019-11-07T08:44:55.000Z"
"2019-11-07T08:44:55.000Z"
julia> parse(ZonedDateTime, s, dateformat"yyyy-mm-ddTHH:MM:SSzzz") # current implementation
ERROR: ArgumentError: Unable to parse date time. Expected directive DatePart(zzz) at char 20
Stacktrace: [...]
julia> parse(ZonedDateTime, s, dateformat"yyyy-mm-ddTHH:MM:SS.ssszzz") # preposed implementation
2019-11-07T08:44:55+00:00
ZonedDateTime
fails to parse the<time>
tag if milliseconds are present. However, the millisecond field seems to be optional in the GPX Time/Date standard. Unfortunately,Dates.jl
(andTimeZones.jl
) does not support optional field arguments (See JuliaTime/TimeZones.jl/issues/83).To following example illiustrates the issue: