-
Notifications
You must be signed in to change notification settings - Fork 545
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
test_leap_second fails on DST transitition days in the US (and possibly other places). #866
Comments
Thanks for the report @plugwash - from my current understanding it looks like we just need to either pick a different time of day to run the test, or more robustly, handle the |
I was able to reproduce this with this test at tag /// Test Issue #866
#[test]
fn test_issue_866() {
#[allow(deprecated)]
let local_20221106 = Local.ymd(2022, 11, 6);
let _dt_20221106 = local_20221106 .and_hms_milli_opt(1, 2, 59, 1000).unwrap();
} |
jtmoon79
added a commit
to jtmoon79/chrono
that referenced
this issue
May 21, 2023
Add single test case specific to Issue chronotope#866
This was referenced May 21, 2023
Closed
Merged
djc
pushed a commit
that referenced
this issue
May 22, 2023
Add single test case specific to Issue #866
Fixed in #1064. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran into a failure of test_leap_second on the CI test infrastructure, after much racking of brains I figured out what the cause was and was then able to reproduce it using faketime. Specifically with the command "RUST_BACKTRACE=1 TZ=America/New_York faketime 2022-11-06 cargo test"
With current git head of chrono (with the latest stable release the error is slightly different, but I belive the concept is the same).
The test combines todays date with a leap second local time of 01:02:60, unfortunately being in the middle of the night that time can be either ambiguous or nonexistent on daylight savings transition days causing the test to panic.
The text was updated successfully, but these errors were encountered: