diff options
author | Daniel Llorens <daniel.llorens@bluewin.ch> | 2018-12-12 08:01:05 +0100 |
---|---|---|
committer | Daniel Llorens <daniel.llorens@bluewin.ch> | 2018-12-12 08:02:23 +0100 |
commit | 901bfef5922ace25c4344522ce47ed872d37f989 (patch) | |
tree | 718100c61069532cd6264420cdd0b9806a0ec690 /test-suite | |
parent | f74cfce4f1572931ec66616a32633c74874769fc (diff) |
Fix tests for SRFI-19 date->string ~N
Diffstat (limited to 'test-suite')
-rw-r--r-- | test-suite/tests/srfi-19.test | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test-suite/tests/srfi-19.test b/test-suite/tests/srfi-19.test index 256ff74a0..1d56214e4 100644 --- a/test-suite/tests/srfi-19.test +++ b/test-suite/tests/srfi-19.test @@ -177,14 +177,18 @@ incomplete numerical tower implementation.)" (date->string date)))) (pass-if "string->date understands nanoseconds (1)" - (time=? (date->time-utc (string->date "2018-12-10 10:53:24.189" - "~Y-~m-~d ~H:~M:~S.~N")) - (date->time-utc (make-date 189000000 24 53 10 10 12 2018 3600)))) + (let ((date (string->date "2018-12-10 10:53:24.189" + "~Y-~m-~d ~H:~M:~S.~N"))) + (time=? (date->time-utc date) + (date->time-utc (make-date 189000000 24 53 10 10 12 2018 + (date-zone-offset date)))))) (pass-if "string->date understands nanoseconds (2)" - (time=? (date->time-utc (string->date "2018-12-10 10:53:24.189654321" - "~Y-~m-~d ~H:~M:~S.~N")) - (date->time-utc (make-date 189654321 24 53 10 10 12 2018 3600)))) + (let ((date (string->date "2018-12-10 10:53:24.189654321" + "~Y-~m-~d ~H:~M:~S.~N"))) + (time=? (date->time-utc date) + (date->time-utc (make-date 189654321 24 53 10 10 12 2018 + (date-zone-offset date)))))) (pass-if "date->string pads small nanoseconds values correctly" (let* ((date (make-date 99999999 5 34 12 26 3 2017 0))) |