Skip to content

TST: tz_localize nonexistent shift across UTC+0 DST boundary (GH#40705)#66019

Merged
jbrockmendel merged 2 commits into
pandas-dev:mainfrom
jbrockmendel:bug-40705
Jun 26, 2026
Merged

TST: tz_localize nonexistent shift across UTC+0 DST boundary (GH#40705)#66019
jbrockmendel merged 2 commits into
pandas-dev:mainfrom
jbrockmendel:bug-40705

Conversation

@jbrockmendel

@jbrockmendel jbrockmendel commented Jun 25, 2026

Copy link
Copy Markdown
Member

closes #40705
closes #40915

Add Europe/London cases to test_dti_tz_localize_nonexistent_shift covering the UTC+0 → UTC+1 DST transition. The timedelta nonexistent shift is the exact reproducer from GH-40705 (previously off by an hour), and the shift_forward form covers GH-40915. Both were fixed by GH-56017, but that PR only added scalar Timestamp coverage at the UTC+0 boundary — the DatetimeIndex path and the timedelta variant were untested.

Add Europe/London cases to test_dti_tz_localize_nonexistent_shift
covering the UTC+0 -> UTC+1 transition, including the timedelta
nonexistent shift from GH#40705 and the shift_forward form from
GH#40915. Both were fixed by GH#56017 but lacked DatetimeIndex
coverage at the UTC+0 boundary.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jbrockmendel jbrockmendel added Testing pandas testing functions or related to the test suite Timezones Timezone data dtype labels Jun 25, 2026
@jbrockmendel jbrockmendel marked this pull request as ready for review June 26, 2026 16:28
@jbrockmendel jbrockmendel merged commit 1685cff into pandas-dev:main Jun 26, 2026
46 checks passed
@jbrockmendel jbrockmendel deleted the bug-40705 branch June 26, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Testing pandas testing functions or related to the test suite Timezones Timezone data dtype

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: tz_localize gives incorrect shift_forward value in some European timezones BUG: Incorrect timedelta with tz_localize and nonexistent times

1 participant