Skip to content

Timestamp and DatetimeIndex construct different timezones #23815

Closed
@TomAugspurger

Description

@TomAugspurger

Question in the form of an issue: is this a bug?

In [37]: pd.Timestamp('2000', tz='US/Central').tz == pd.DatetimeIndex(['2000'], tz='US/Central').tz
Out[37]: False

This leads to strange things like

In [38]: idx = pd.date_range('20170101', periods=4, tz='US/Pacific')

In [39]: idx[0].tz == idx.tz
Out[39]: False

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions