waltzofpearls / dateparser

Parse dates in commonly used string formats with Rust.
MIT License
41 stars 8 forks source link

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

Closed Ictoan42 closed 2 months ago

Ictoan42 commented 3 months ago

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)

waltzofpearls commented 2 months ago

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.