You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia>using Dates
julia>using TimeZones
julia>diff(ZonedDateTime(DateTime(2021,1,1), tz"UTC"):Hour(1):ZonedDateTime(DateTime(2021,1,2), tz"UTC"))
ERROR: MethodError: Cannot `convert` an object of type Millisecond to an object of type ZonedDateTime
Closest candidates are:convert(::Type{T}, ::T) where T at essentials.jl:205ZonedDateTime(::Union{Period, TimeZone}...) at /home/oxinabox/.julia/packages/TimeZones/y3gf6/src/types/zoneddatetime.jl:136
Stacktrace:
[1] setindex!(A::Vector{ZonedDateTime}, x::Millisecond, i1::Int64)
@ Base ./array.jl:839
[2] diff(r::StepRange{ZonedDateTime, Hour}; dims::Int64)
@ Base ./multidimensional.jl:966
[3] diff(r::StepRange{ZonedDateTime, Hour})
@ Base ./multidimensional.jl:965
[4] top-level scope
@ REPL[32]:1
Consider
Interesting Julia gets this wrong, but doesn't error JuliaLang/julia#41336
If we
collect
it we get the right answerThe text was updated successfully, but these errors were encountered: