You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Joris Van den Bossche (Jira)" <ji...@apache.org> on 2022/04/07 11:31:00 UTC
[jira] [Created] (ARROW-16140) [Python] zoneinfo timezones failing during type inference
Joris Van den Bossche created ARROW-16140:
---------------------------------------------
Summary: [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
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)