From fdbbe4d03737c9e993f082c27752b465a5e0a43e Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 6 Dec 2026 04:44:26 +0100 Subject: [PATCH] test(model-connector): pin 2000-03-01 and 2100-03-01 UTC calendar boundaries --- crates/model-connector/src/price.rs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/crates/model-connector/src/price.rs b/crates/model-connector/src/price.rs index 8b984cb..8a4d432 100644 --- a/crates/model-connector/src/price.rs +++ b/crates/model-connector/src/price.rs @@ -229,7 +229,7 @@ mod tests { ); } - // 400-year leap boundary (2000-02-29, Tuesday) and 100-year non-leap boundary (2100-01-01, Friday). + // 400-year leap boundary (2000-02-29, 2000-03-01) and 100-year non-leap boundary (2100-03-01). assert_eq!( utc_parts(11_016 * 86_400 * 1_000), UtcParts { @@ -241,12 +241,22 @@ mod tests { } ); assert_eq!( - utc_parts(47_482 * 86_400 * 1_000), + utc_parts(11_017 * 86_400 * 1_000), + UtcParts { + year: 2000, + month: 3, + day: 1, + weekday: Weekday::Wed, + hour: 0, + } + ); + assert_eq!( + utc_parts(47_541 * 86_400 * 1_000), UtcParts { year: 2100, - month: 1, + month: 3, day: 1, - weekday: Weekday::Fri, + weekday: Weekday::Mon, hour: 0, } );