-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Bad shift_forward around UTC+0 when DST #56017
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
Changes from 3 commits
e7d15f0
8c1e35a
41d096b
4482dd8
65dbc2b
1f89461
9a6cd66
6accd91
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -416,6 +416,9 @@ timedelta-like} | |
|
||
else: | ||
delta_idx = bisect_right_i8(info.tdata, new_local, info.ntrans) | ||
if (shift_forward or shift_delta > 0) and \ | ||
info.deltas[delta_idx-1] >= 0: | ||
delta_idx_offset = 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if it's safe to permanently change this to 1 for future iterations. Might be safer to do something like
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, make sense. But there is this piece of code just before the loop to precompute I don't know why it was precomputed. Was we assuming that there are just one time zone in the array? Further more there is a recent PR around that block of code for a segfault problem. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh misunderstood what you mean. Corrected. |
||
|
||
delta_idx = delta_idx - delta_idx_offset | ||
result[i] = new_local - info.deltas[delta_idx] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated