tpgillam opened a new issue, #327:
URL: https://github.com/apache/arrow-julia/issues/327

   It seems like the ArrowTypes representation of ZonedDateTime doesn't include 
enough information to resolve ambiguities around DST, e.g.:
   
   ```julia
   julia> zdt = ZonedDateTime(DateTime(2020, 11, 1, 6), tz"America/New_York"; 
from_utc=true)
   2020-11-01T01:00:00-05:00
   
   julia> arrow_zdt = ArrowTypes.toarrow(zdt)
   Arrow.Timestamp{Arrow.Flatbuf.TimeUnits.MILLISECOND, 
Symbol("America/New_York")}(1604192400000)
   
   julia> ArrowTypes.fromarrow(ZonedDateTime, arrow_zdt)
   ERROR: AmbiguousTimeError: Local DateTime 2020-11-01T01:00:00 is ambiguous 
within America/New_York
   Stacktrace:
    [1] (::TimeZones.var"#construct#8"{DateTime, 
VariableTimeZone})(T::Type{Local})
      @ TimeZones 
~/.julia/packages/TimeZones/X0cjt/src/types/zoneddatetime.jl:46
    [2] #ZonedDateTime#7
      @ ~/.julia/packages/TimeZones/X0cjt/src/types/zoneddatetime.jl:50 
[inlined]
    [3] ZonedDateTime
      @ ~/.julia/packages/TimeZones/X0cjt/src/types/zoneddatetime.jl:37 
[inlined]
    [4] convert(#unused#::Type{ZonedDateTime}, 
x::Arrow.Timestamp{Arrow.Flatbuf.TimeUnits.MILLISECOND, 
Symbol("America/New_York")})
      @ Arrow ~/.julia/packages/Arrow/ZlMFU/src/eltypes.jl:265
    [5] fromarrow(#unused#::Type{ZonedDateTime}, 
x::Arrow.Timestamp{Arrow.Flatbuf.TimeUnits.MILLISECOND, 
Symbol("America/New_York")})
      @ Arrow ~/.julia/packages/Arrow/ZlMFU/src/eltypes.jl:300
    [6] top-level scope
      @ REPL[16]:1
   ```
   
   Knowing very little about how how we're constrained within the arrow spec, 
can this be fixed by storing the UTC timestamp? I'm _guessing_ we're running 
into this as we're storing a local timestamp + the timezone (?), which isn't 
quite enough information.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to