Skip to content

Conversation

@sinhrks
Copy link
Member

@sinhrks sinhrks commented Apr 6, 2014

>>> idx = pd.date_range(start='2010-11-02 01:00:00', periods=3, tz='US/Pacific', freq='1H')

>>> idx + offsets.Hour(3)
[2010-11-02 04:00:00-07:00, ..., 2010-11-02 06:00:00-07:00]
Length: 3, Freq: H, Timezone: US/Pacific

>>> idx + datetime.timedelta(hours=3)
[2010-11-02 04:00:00-07:00, ..., 2010-11-02 06:00:00-07:00]
Length: 3, Freq: H, Timezone: US/Pacific

>>> idx + np.timedelta64(3, 'h')          # incorrect
[2010-11-02 11:00:00-07:00, ..., 2010-11-02 13:00:00-07:00]
Length: 3, Freq: H, Timezone: US/Pacific
@jreback jreback added this to the 0.14.0 milestone Apr 6, 2014
@jreback
Copy link
Contributor

jreback commented Apr 6, 2014

looks good

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trivial, but can you add the issue number (in this case PR number), as a comment near tests, easier reference for later

@sinhrks
Copy link
Member Author

sinhrks commented Apr 7, 2014

OK, I've added a comment and rebased. There seems to be unnecessary line remains in release.rst thus removed it.

jreback added a commit that referenced this pull request Apr 7, 2014
BUG: adding np.timedelta64 to DatetimeIndex with tz outputs incorrect
@jreback jreback merged commit ee1923c into pandas-dev:master Apr 7, 2014
@sinhrks sinhrks deleted the timedelta64 branch April 12, 2014 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Timezones Timezone data dtype

2 participants