[Python] Array.__str__ shows misleading output for timestamp types with time zone set
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
The output is being shown with UTC interpretation
```Java
In [13]: arr = pa.array([0, 1, 2], type=pa.timestamp('ns', 'America/Los_Angeles'))
In [14]: arr.view('int64')
Out[14]:
[
0,
1,
2
]
In [15]: arr.type
Out[15]: TimestampType(timestamp[ns, tz=America/Los_Angeles])
In [16]: arr
Out[16]:
[
1970-01-01 00:00:00.000000000,
1970-01-01 00:00:00.000000001,
1970-01-01 00:00:00.000000002
]
```
**Reporter**: [Wes McKinney](https://issues.apache.org/jira/browse/ARROW-9525) / @wesm
**Note**: *This issue was originally created as [ARROW-9525](https://issues.apache.org/jira/browse/ARROW-9525). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Contributor guide
Research direction
Start at the Python Array.__str__ entry point and reproduce the timestamp array example shown in the issue. Trace how timezone-aware timestamps are formatted, then verify that the displayed values no longer give a misleading UTC interpretation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100