You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a DatetimeIndex from a list of timezone-aware datetimes shift the times according to the offset of the timezone.
Using an easy way to get a list of datetimes by creating a DatetimeIndex and casting it to a list:
dr = pandas.date_range('2012-06-02', periods=10, tz=pytz.timezone('US/Eastern'))
Creating a DatetimeIndex from a list of timezone-aware datetimes shift the times according to the offset of the timezone.
Using an easy way to get a list of datetimes by creating a DatetimeIndex and casting it to a list:
dr = pandas.date_range('2012-06-02', periods=10, tz=pytz.timezone('US/Eastern'))
<class 'pandas.tseries.index.DatetimeIndex'>
[2012-06-02 00:00:00, ..., 2012-06-11 00:00:00]
Length: 10, Freq: D, Timezone: US/Eastern
pandas.DatetimeIndex(list(a))
<class 'pandas.tseries.index.DatetimeIndex'>
[2012-06-02 04:00:00, ..., 2012-06-11 04:00:00]
Length: 10, Freq: None, Timezone: US/Eastern
The text was updated successfully, but these errors were encountered: