Hi, Ondrej Zajicek <[EMAIL PROTECTED]> writes:
> (use-modules (srfi srfi-19)) > (define (str->date str) (string->date str "~d-~m-~Y")) > (define (date->str str) (date->string str "~d-~m-~Y")) > > (date->str (time-utc->date (date->time-utc (str->date "01-01-2006")))) > -> "31-12-2005" > > Is is a bug in leap second handling or is it a expected behavior? Not sure. Our leap second table is up-to-date. Apparently, `time-utc->date' honors leap seconds, while `date->time-utc' doesn't. In the reference implementation at schemers.org (upon which Guile's is based), none of these two honors leap seconds AFAICS. I'm no expert in that area but I would suggest emailing the SRFI-19 mailing list [0] for advice. It seems that most implementations use the reference implementation with few modifications, in which case most implementations might be affected. Did you try it with other Scheme implementations? Thanks, Ludovic. [0] http://srfi.schemers.org/srfi-19/
