diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-03-22 23:40:49 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-03-22 23:40:49 +0100 |
commit | 3c211e775f57a1a5a731bb4d059bafbaa581210d (patch) | |
tree | 38958e29cd9f58fa9192b7b196f14b3d60dee9b2 /module/datetime.scm | |
parent | Date difference once again returns dates. (diff) | |
download | calp-3c211e775f57a1a5a731bb4d059bafbaa581210d.tar.gz calp-3c211e775f57a1a5a731bb4d059bafbaa581210d.tar.xz |
Fix TZ problem with datetime<.
Diffstat (limited to 'module/datetime.scm')
-rw-r--r-- | module/datetime.scm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/module/datetime.scm b/module/datetime.scm index 8df055de..2b330a9c 100644 --- a/module/datetime.scm +++ b/module/datetime.scm @@ -262,14 +262,18 @@ (time< a b))) (define-public (datetime< a b) - (if (date= (get-date a) (get-date b)) - (time< (get-time a) (get-time b)) - (date< (get-date a) (get-date b)))) + (let ((a (get-datetime a)) + (b (get-datetime b))) + (if (date= (get-date a) (get-date b)) + (time< (get-time% a) (get-time% b)) + (date< (get-date a) (get-date b))))) (define-public (datetime<= a b) - (if (date= (get-date a) (get-date b)) - (time<= (get-time a) (get-time b)) - (date<= (get-date a) (get-date b)))) + (let ((a (get-datetime a)) + (b (get-datetime b))) + (if (date= (get-date a) (get-date b)) + (time<= (get-time% a) (get-time% b)) + (date<= (get-date a) (get-date b))))) (define-public (date/-time< a b) (datetime< (as-datetime a) (as-datetime b))) |