From a9676626bef0f99ab46437bbb037fffd521bbfaf Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Sun, 25 May 2025 21:15:53 +0200 Subject: [PATCH] src/items: Fix timezone tests The current tests look wrong ("%Z" shouldn't print an offset, but this accidentally works due to the way the parsing logic operates), fix that. --- src/items/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/items/mod.rs b/src/items/mod.rs index 2ce2810..2e12085 100644 --- a/src/items/mod.rs +++ b/src/items/mod.rs @@ -527,12 +527,12 @@ mod tests { assert_eq!( "2024-07-17 06:14:49 +00:00", - test_eq_fmt("%Y-%m-%d %H:%M:%S %Z", "Jul 17 06:14:49 2024 GMT"), + test_eq_fmt("%Y-%m-%d %H:%M:%S %:z", "Jul 17 06:14:49 2024 GMT"), ); assert_eq!( "2024-07-17 06:14:49 -03:00", - test_eq_fmt("%Y-%m-%d %H:%M:%S %Z", "Jul 17 06:14:49 2024 BRT"), + test_eq_fmt("%Y-%m-%d %H:%M:%S %:z", "Jul 17 06:14:49 2024 BRT"), ); } }