You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Sander Goos (Jira)" <ji...@apache.org> on 2022/05/12 15:16:00 UTC

[jira] [Created] (ARROW-16547) PyArrow to_pandas fails with FixedOffset timezones when timestamp_as_object is used

Sander Goos created ARROW-16547:
-----------------------------------

             Summary: PyArrow to_pandas fails with FixedOffset timezones when timestamp_as_object is used
                 Key: ARROW-16547
                 URL: https://issues.apache.org/jira/browse/ARROW-16547
             Project: Apache Arrow
          Issue Type: Bug
          Components: Python
            Reporter: Sander Goos
         Attachments: pyarrow_to_pandas_repro.py

The `to_pandas` method fails with "ValueError: fromutc: dt.tzinfo is not self" when timestamp_as_object=True and a timezone with a fixed offset is used. E.g. "+08:00"

Repro script attached.

 

The problem seems to be that `fromutc` is called on the tzinfo object here, which is not working when the object is pytz._FixedOffset: [https://github.com/apache/arrow/blob/90aac16761b7dbf5fe931bc8837cad5116939270/cpp/src/arrow/python/arrow_to_pandas.cc#L1068]



--
This message was sent by Atlassian Jira
(v8.20.7#820007)