SRFI-19: time-utc->date: Support non-integer nanoseconds values.
authorMark H Weaver <mhw@netris.org>
Mon, 22 Oct 2018 07:21:40 +0000 (03:21 -0400)
committerMark H Weaver <mhw@netris.org>
Wed, 24 Oct 2018 05:14:26 +0000 (01:14 -0400)
* module/srfi/srfi-19.scm (time-utc->date): Use 'floor-remainder'
instead of 'modulo'.

module/srfi/srfi-19.scm

index 2f5f322dfcfb28f9ee3cb509839677ae71eb6b8a..5ab5d89f2a97ed1735b7f96b2437a8416684a139 100644 (file)
                (rem      (remainder int-secs (* 60 60)))
                (minutes  (quotient rem 60))
                (seconds  (remainder rem 60)))
-          (make-date (modulo nanoseconds nano)
+          (make-date (floor-remainder nanoseconds nano)
                      seconds
                      minutes
                      hours