Skip to content

Update timezone test to only use past dates#31780

Merged
jklymak merged 1 commit into
matplotlib:mainfrom
ksunden:canada_timzones
May 30, 2026
Merged

Update timezone test to only use past dates#31780
jklymak merged 1 commit into
matplotlib:mainfrom
ksunden:canada_timzones

Conversation

@ksunden

@ksunden ksunden commented May 29, 2026

Copy link
Copy Markdown
Member

PR summary

So British Columbia passed a law and our tests broke. BC no longer is going to observe DST, and so our test which used the 'Canada/Pacific' tz and tested dates going out ~200 years broke due to an update of the IANA Timezone database became off by an hour for future dates.

This updates the test to only use past dates, spanning only 20 years instead of 200, but still tests that the tick no longer is the original date, as is expected.

Relevant XKCD:

AI Disclosure

None

PR checklist

So British Columbia passed a law and our tests broke. BC no longer is going to observe DST, and so our test which used the 'Canada/Pacific' tz and tested dates going out ~200 years broke due to an [update](https://lists.iana.org/hyperkitty/list/tz-announce@iana.org/message/VX2Z3CBO6KHTYZNBBKFFWM7ZCI6TVCXP/) of the IANA Timezone database became off by an hour for future dates.

This updates the test to only use past dates, spanning only 20 years instead of 200, but still tests that the tick no longer is the original date, as is expected.
@ksunden ksunden added this to the v3.11.0 milestone May 29, 2026
@jklymak

jklymak commented May 29, 2026

Copy link
Copy Markdown
Member

Just a small correction. BC plans to stay on Pacific daylight savings (UTC-7) and not switch to Pacific standard time (UTC-8).

We will see how long it lasts when we are out of step with the rest of the west coast and it's still dark at 9:30 am in late December.

@jklymak jklymak merged commit bfb3875 into matplotlib:main May 30, 2026
38 checks passed
QuLogic added a commit that referenced this pull request May 30, 2026
…780-on-v3.11.x

Backport PR #31780 on branch v3.11.x (Update timezone test to only use past dates)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants