guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leap second bug?


From: Ludovic Courtès
Subject: Re: Leap second bug?
Date: Mon, 09 Jun 2008 00:00:44 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Hi,

Ondrej Zajicek <address@hidden> 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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]