aboutsummaryrefslogtreecommitdiff
path: root/module/srfi
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-11-09 13:59:55 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-11-09 13:59:55 +0100
commita658779710cf02200c4a1972d23a73be21f23c09 (patch)
tree12eda4765c79ce63bc790463470f974e8969e34f /module/srfi
parentFix leap-seconds in normalize-date*. (diff)
downloadcalp-a658779710cf02200c4a1972d23a73be21f23c09.tar.gz
calp-a658779710cf02200c4a1972d23a73be21f23c09.tar.xz
Fii normalize-date* from previous commit.
Diffstat (limited to 'module/srfi')
-rw-r--r--module/srfi/srfi-19/util.scm9
1 files changed, 4 insertions, 5 deletions
diff --git a/module/srfi/srfi-19/util.scm b/module/srfi/srfi-19/util.scm
index ff23dbb9..67d407f8 100644
--- a/module/srfi/srfi-19/util.scm
+++ b/module/srfi/srfi-19/util.scm
@@ -108,11 +108,10 @@ attribute set to 0. Can also be seen as \"Start of day\""
;; hack to handle leap seconds. NOTE this should be reworked.
(define-public (normalize-date* date)
(define next-date
- (date-second
- (time-utc->date
- (add-duration (date->time-utc date)
- (make-time time-duration 0 10)))
- (set next-date 0))))
+ (time-utc->date
+ (add-duration (date->time-utc date)
+ (make-time time-duration 0 10))))
+ (set (date-second next-date) 0))
;; Returns a stream of date objects, one day appart, staring from start-day.
(define-public (day-stream start-day)