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

Change a few tests that try to construct an invalid datetime in some timezones #50

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

Ictoan42
Copy link
Contributor

These tests break between 1am and 2am in some timezones that observe daylight savings time, including most european timezones.

The affected timezones move forward 1 hour at 1am on the last Sunday of March. March 30th was the last Sunday of March in 2014, meaning that in the affected timezones, March 30th 2014 1:31am (for example) never happened.

This means that these 3 test cases, which all try to construct a datetime with the date of 2014/03/30 but with the current time, attempt to create an invalid date if the test is run between 1am and 2am.

This patch just changes each test to 2014/03/29, which has no weird properties (as far as I know)

these tests break between 1am and 2am in countries that observe daylight
savings time and move the clocks forward on the last sunday of march,
for example BST.

March 30th was the last sunday of march in 2014, so the clocks jumped
from 1am to 2am on that date, meaning that datetimes on that date
between 1am and 2am are an invalid time in those timezones. Therefore,
those tests fail during that time period, every day
Copy link
Owner

@waltzofpearls waltzofpearls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the fix!

@waltzofpearls
Copy link
Owner

Will merge this PR since I have just fix the failed clippy check in another PR, and the failed clippy check is not caused by this change.

@waltzofpearls waltzofpearls merged commit 0a221cd into waltzofpearls:main Jun 3, 2024
13 of 14 checks passed
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.

2 participants