[
https://issues.apache.org/jira/browse/ARROW-16140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alenka Frim reassigned ARROW-16140:
-----------------------------------
Assignee: Alenka Frim
> [Python] zoneinfo timezones failing during type inference
> ---------------------------------------------------------
>
> Key: ARROW-16140
> URL: https://issues.apache.org/jira/browse/ARROW-16140
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Python
> Reporter: Joris Van den Bossche
> Assignee: Alenka Frim
> Priority: Major
>
> The conversion itself works fine (eg when specifying
> {{type=pa.timestamp("us", tz="America/New_York")}} in the below example), but
> inferring the type and timezone from the first value fails if it has a
> zoneinfo timezone:
> {code}
> In [53]: tz = zoneinfo.ZoneInfo(key='America/New_York')
> In [54]: dt = datetime.datetime(2013, 11, 3, 10, 3, 14, tzinfo = tz)
> In [55]: pa.array([dt])
> ....
> ArrowInvalid: Object returned by tzinfo.utcoffset(None) is not an instance of
> datetime.timedelta
> {code}
> cc [~alenkaf]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)