From 3c211e775f57a1a5a731bb4d059bafbaa581210d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 22 Mar 2020 23:40:49 +0100 Subject: Fix TZ problem with datetime<. --- tests/datetime-compare.scm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/datetime-compare.scm b/tests/datetime-compare.scm index eab2b949..cd077e87 100644 --- a/tests/datetime-compare.scm +++ b/tests/datetime-compare.scm @@ -64,6 +64,12 @@ (test-assert "date/-time< other dt, same date" (date/-time< #2020-01-01 #2020-01-01T10:00:00)) +;; In UTC+2 (CEST) the below datetime overflows into midnight the following +;; day. Earlier versions of this program only looked at the time component +(test-assert "date/-time< TZ overflow" + (date/-time< #2020-04-05 + (datetime date: #2020-04-05 time: #22:00:00 tz: "UTC"))) + (test-assert "date/-time< time-only" (date/-time< #00:00:00 #10:00:00)) -- cgit v1.2.3