Closed
Description
Related to #11456. Currently, DatetimeIndex
handles mixed tz values like below. This behavior sometimes triggers coercion between tz-aware/tz-naive.
pd.Index([pd.Timestamp('2011-01-01'), pd.Timestamp('2011-01-02', tz='US/Eastern')])
# DatetimeIndex(['2010-12-31 19:00:00-05:00', '2011-01-02 00:00:00-05:00'], dtype='datetime64[ns, US/Eastern]', freq=None)
# -> should be normal Index with object dtype?
pd.Index([pd.Timestamp('2011-01-01', tz='Asia/Tokyo'), pd.Timestamp('2011-01-02', tz='US/Eastern')])
# DatetimeIndex(['2010-12-31 15:00:00', '2011-01-02 05:00:00'], dtype='datetime64[ns]', freq=None)
# -> should be normal Index with object dtype?
pd.Index([pd.Timestamp('2011-01-01'), pd.Timestamp('2011-01-02', tz='US/Eastern')], tz='Asia/Tokyo')
# DatetimeIndex(['2011-01-01 09:00:00+09:00', '2011-01-02 14:00:00+09:00'], dtype='datetime64[ns, Asia/Tokyo]', freq=None)
# -> OK, localized to explicitly passed tz ('Asia/Tokyo')