-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Closed
Labels
API DesignDatetimeDatetime data dtypeDatetime data dtypeTimezonesTimezone data dtypeTimezone data dtype
Milestone
Description
The original DatetimeIndex has the tz:
In [1]: pd.DatetimeIndex(
...: pd.tseries.tools.to_datetime(['2013-1-1 13:00'], errors="raise")).tz_localize('US/Pacific')[0]
Out[1]: Timestamp('2013-01-01 13:00:00-0800', tz='US/Pacific')
But when converted to a Series, the tz info is lost:
In [2]: pd.Series(pd.DatetimeIndex(
...: pd.tseries.tools.to_datetime(['2013-1-1 13:00'], errors="raise")).tz_localize('US/Pacific'))[0]
Out[2]: Timestamp('2013-01-01 21:00:00', tz=None)
If this is by design, then a warning would be nice.
This issue came up when I tried to add a list of timezone aware dates to a DataFrame.
Metadata
Metadata
Assignees
Labels
API DesignDatetimeDatetime data dtypeDatetime data dtypeTimezonesTimezone data dtypeTimezone data dtype