-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Clarify DST rounding behavior in Timestamp/DatetimeIndex #44357
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
DOC: Clarify DST rounding behavior in Timestamp/DatetimeIndex #44357
Conversation
…etimeindex_rounding
…etimeindex_rounding
…etimeindex_rounding
just wondering out loud if we could/should actually do this in a tz-aware way for cc @mroeschke |
@jreback found discussion #22560 (comment) and #22560 (comment) that rounding in a tz-aware might not actually be possible and falling back to rounding based on actual, UTC time may give unexpected results. |
my question is can we leave in thr tz and do a round operation w/o introducing ambiguity? |
Hmm since the rounding operations happen on epoch timestamps, rounding could happen on the UTC epoch timestamps and relocalized without ambiguity i.e. |
@mroeschke rereading i am wondering if it's always possible in freq < day (eg hour / min) to do the round ops in local time (and not convert-round-localize) which can introduce ambiguity |
…etimeindex_rounding
Yeah for small rounding frequencies this can be achieved. Looking at the UTC offsets I think the limit is sub 15 minutes (I see a +05:45 UTC offset for example) |
…etimeindex_rounding
…etimeindex_rounding
thanks @mroeschke |
xref #44287