From d5ff6d1e26d425b06dbfbc5970755166326da2e4 Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Tue, 28 May 2024 18:03:43 -0700 Subject: [PATCH] Revert tests of leap-second handling: we now just clamp them to 0..=58 Signed-off-by: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> --- src/types.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types.rs b/src/types.rs index 5376f238..f56b3c06 100644 --- a/src/types.rs +++ b/src/types.rs @@ -1181,10 +1181,10 @@ mod test { fn datetime_bounds() { use super::DateTime; - assert!(DateTime::from_date_and_time(2000, 1, 1, 23, 59, 58).is_ok()); + assert!(DateTime::from_date_and_time(2000, 1, 1, 23, 59, 60).is_ok()); assert!(DateTime::from_date_and_time(2000, 1, 1, 24, 0, 0).is_err()); assert!(DateTime::from_date_and_time(2000, 1, 1, 0, 60, 0).is_err()); - assert!(DateTime::from_date_and_time(2000, 1, 1, 0, 0, 59).is_err()); + assert!(DateTime::from_date_and_time(2000, 1, 1, 0, 0, 61).is_err()); assert!(DateTime::from_date_and_time(2107, 12, 31, 0, 0, 0).is_ok()); assert!(DateTime::from_date_and_time(1980, 1, 1, 0, 0, 0).is_ok());