From fa4a543fd0a89671190e5ce131213013bae55327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Pol=C3=A1=C4=8Dek?= Date: Sat, 30 Mar 2024 22:18:22 +0100 Subject: [PATCH] Add a punch test in the afternoon --- src/punch.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/punch.rs b/src/punch.rs index 9648317..c00d806 100644 --- a/src/punch.rs +++ b/src/punch.rs @@ -247,6 +247,10 @@ mod test_punch { let time = DateTime::parse_from_rfc3339("2023-11-23T10:00:03.999+00:00").unwrap(); let bytes = SiPunch::time_to_bytes(time); assert_eq!(bytes, [0x8, 0x8c, 0xa3, 0xff]); + + let time = DateTime::parse_from_rfc3339("2023-11-26T22:00:03.000+00:00").unwrap(); + let bytes = SiPunch::time_to_bytes(time); + assert_eq!(bytes, [0x1, 0x8c, 0xa3, 0x00]); } #[test]