reference implementation did not handle DST and time zones properly
and relied on non-R5RS-isms like passing reals to `quotient'. For
Guile, some additional fixes were needed because of the incomplete
numeric tower implementation. See also srfi-19.test.
* srfi-19.scm (date-zone-offset): Fixed typo in export clause.
(add-duration): Renamed from priv:add-duration.
(priv:time-normalize!): Handle fractional nanoseconds; remove
duplicate definition. (priv:current-time-tai): Fixed typo. (time=?,
time<=?): Fixed typos. (time-tai->time-utc, time-utc->time-tai,
time-utc->time-monotonic): Use make-time-unnormalized instead of
make-time when uninitialized time fields are used.
(set-date-nanosecond!, set-date-second!, set-date-minute!,
set-date-hour!, set-date-day!, set-date-month!, set-date-year!,
set-date-zone-offset!): Define. (priv:local-tz-offset): Take an extra
argument in order to handle DST effects. (time-utc->date,
time-tai->date, time-monotonic->date): Handle the changed signature of
priv:local-tz-offset. Don't pass non-integer arguments to quotient
(non-R5RS, not supported by Guile). (date->time-utc): Ensure that
seconds in a date structure are always exact integers. Handle DST
properly. (current-date, julian-day->date,
modified-julian-day->date): Handle the changed signature of
priv:local-tz-offset. (julian-day->time-utc): Reverted earlier
inexact->exact hack; make-time now handles inexact arguments.
(priv:locale-print-time-zone): At least print the numerical time zone.
(priv:integer-reader): Fixed named let iteration.
(priv:read-directives): Use set-date-month! instead of
priv:set-date-month! etc. (string->date): Handle DST properly.
keywords conflict. Time passes... Removed :optional altogether
and just handle optional args directly. Thanks to Matthias Koeppe
for the report of this and the two bits below.
(priv:decode-julian-day-number): add inexact->exact for truncate
result.
(time-utc->date): add inexact->exact and floor so quotient will
work.
* srfi-19.scm, srfi-17.scm, srfi-16.scm, srfi-14.scm, srfi-13.scm,
srfi-11.scm, srfi-10.scm, srfi-9.scm, srfi-8.scm, srfi-6.scm,
srfi-2.scm: Use `cond-expand-provide' for providing features to
`cond-expand'.