We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This causes an error. For example in Julia 1.7.2, I see:
julia> using TimeZones, Dates julia> Dates.format(now(), "yyyy-mm-ddTHH:MM:SSZ") ERROR: type DateTime has no field zone Stacktrace: [1] getproperty @ ./Base.jl:42 [inlined] [2] format(io::IOBuffer, d::Dates.DatePart{'Z'}, zdt::DateTime, locale::Dates.DateLocale) @ TimeZones ~/.julia/packages/TimeZones/1ALMR/src/parse.jl:81 [3] macro expansion @ /opt/julia/share/julia/stdlib/v1.7/Dates/src/io.jl:663 [inlined] [4] format(io::IOBuffer, dt::DateTime, fmt::DateFormat{Symbol("yyyy-mm-ddTHH:MM:SSZ"), Tuple{Dates.DatePart{'y'}, Dates.Delim{Char, 1}, Dates.DatePart{'m'}, Dates.Delim{Char, 1}, Dates.DatePart{'d'}, Dates.Delim{Char, 1}, Dates.DatePart{'H'}, Dates.Delim{Char, 1}, Dates.DatePart{'M'}, Dates.Delim{Char, 1}, Dates.DatePart{'S'}, Dates.DatePart{'Z'}}}) @ Dates /opt/julia/share/julia/stdlib/v1.7/Dates/src/io.jl:658 [5] format(dt::DateTime, fmt::DateFormat{Symbol("yyyy-mm-ddTHH:MM:SSZ"), Tuple{Dates.DatePart{'y'}, Dates.Delim{Char, 1}, Dates.DatePart{'m'}, Dates.Delim{Char, 1}, Dates.DatePart{'d'}, Dates.Delim{Char, 1}, Dates.DatePart{'H'}, Dates.Delim{Char, 1}, Dates.DatePart{'M'}, Dates.Delim{Char, 1}, Dates.DatePart{'S'}, Dates.DatePart{'Z'}}}, bufsize::Int64) @ Dates /opt/julia/share/julia/stdlib/v1.7/Dates/src/io.jl:670 [6] format(dt::DateTime, fmt::DateFormat{Symbol("yyyy-mm-ddTHH:MM:SSZ"), Tuple{Dates.DatePart{'y'}, Dates.Delim{Char, 1}, Dates.DatePart{'m'}, Dates.Delim{Char, 1}, Dates.DatePart{'d'}, Dates.Delim{Char, 1}, Dates.DatePart{'H'}, Dates.Delim{Char, 1}, Dates.DatePart{'M'}, Dates.Delim{Char, 1}, Dates.DatePart{'S'}, Dates.DatePart{'Z'}}}) @ Dates /opt/julia/share/julia/stdlib/v1.7/Dates/src/io.jl:669 [7] format(dt::DateTime, f::String; locale::Dates.DateLocale) @ Dates /opt/julia/share/julia/stdlib/v1.7/Dates/src/io.jl:709 [8] format(dt::DateTime, f::String) @ Dates /opt/julia/share/julia/stdlib/v1.7/Dates/src/io.jl:709 [9] top-level scope @ REPL[3]:1
The text was updated successfully, but these errors were encountered:
Related upstream issue: JuliaLang/julia#29339
Sorry, something went wrong.
You can work around this problem by escaping the characters you want to treat as literals:
julia> using TimeZones, Dates julia> Dates.format(now(), "yyyy-mm-dd\\THH:MM:SS\\Z") "2022-02-25T10:03:06Z" julia> Dates.format(now(), dateformat"yyyy-mm-dd\THH:MM:SS\Z") "2022-02-25T10:03:14Z"
No branches or pull requests
This causes an error. For example in Julia 1.7.2, I see:
The text was updated successfully, but these errors were encountered: