Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Timestamp.tz_localize resets nanosecond #7534

merged 1 commit into from Jun 21, 2014


None yet
2 participants
Copy link

commented Jun 21, 2014

Timestamp.tz_localize resets nanosecond.

t = pd.Timestamp('2011-01-01') + pd.offsets.Nano(1)
# Warning: discarding nonzero nanoseconds
#2011-01-01 00:00:00-05:00

Even though DatetimeIndex.tz_convert can preserve it.

idx = pd.date_range('3/11/2012 04:00', periods=10, freq='N')
# <class 'pandas.tseries.index.DatetimeIndex'>
# [2012-03-11 04:00:00-04:00, ..., 2012-03-11 04:00:00.000000009-04:00]
# Length: 10, Freq: N, Timezone: US/Eastern

This comment has been minimized.

Copy link
Member Author

commented Jun 21, 2014

Ah, the subject and release note are incorrect. Problem is tz_localize, not tz_convert. As I'm out, will fix later.

@jreback jreback added Bug labels Jun 21, 2014

@jreback jreback added this to the 0.14.1 milestone Jun 21, 2014

jreback added a commit that referenced this pull request Jun 21, 2014

Merge pull request #7534 from sinhrks/nanotz
BUG: Timestamp.tz_convert resets nanosecond

@jreback jreback merged commit d60c46a into pandas-dev:master Jun 21, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed

This comment has been minimized.

Copy link

commented Jun 21, 2014


@sinhrks sinhrks deleted the sinhrks:nanotz branch Jun 21, 2014

@sinhrks sinhrks changed the title BUG: Timestamp.tz_convert resets nanosecond BUG: Timestamp.tz_localize resets nanosecond Jun 21, 2014


This comment has been minimized.

Copy link
Member Author

commented Jun 21, 2014

Sorry, corrected subject and sent another PR to fix release note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.