1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

SRFI-19: time-utc->date: Support non-integer nanoseconds values.

* module/srfi/srfi-19.scm (time-utc->date): Use 'floor-remainder'
instead of 'modulo'.
This commit is contained in:
Mark H Weaver 2018-10-22 03:21:40 -04:00
parent c9d903b6e4
commit ac1fa8dba4

View file

@ -639,7 +639,7 @@
(rem (remainder int-secs (* 60 60))) (rem (remainder int-secs (* 60 60)))
(minutes (quotient rem 60)) (minutes (quotient rem 60))
(seconds (remainder rem 60))) (seconds (remainder rem 60)))
(make-date (modulo nanoseconds nano) (make-date (floor-remainder nanoseconds nano)
seconds seconds
minutes minutes
hours hours