BUG: Interval(Timestamp(..., tz=...)) should show UTC offset · Issue #55015 · pandas-dev/pandas (original) (raw)
Pandas version checks
- I have checked that this issue has not already been reported.
- I have confirmed this bug exists on the latest version of pandas.
- I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
In [17]: from pandas import *
In [20]: Interval(Timestamp('2013-01-01 16:00:00', tz="US/Eastern"), Timestamp('2013-01-02 08:00:00', tz="US/Eastern")) Out[20]: Interval('2013-01-01 16:00:00', '2013-01-02 08:00:00', closed='right')
In [21]: Interval(Timestamp('2013-01-01 16:00:00', tz="US/Eastern"), Timestamp('2013-01-02 08:00:00', tz="US/Eastern")).left Out[21]: Timestamp('2013-01-01 16:00:00-0500', tz='US/Eastern')
Issue Description
Though the left and right boundaries of the interval are tz aware, the repr of Interval
does not indicate that the bounds are tz aware
Expected Behavior
Out[20]: Interval('2013-01-01 16:00:00-0500', '2013-01-02 08:00:00-0500', closed='right')
Installed Versions
Replace this line with the output of pd.show_versions()