unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-user@gnu.org
Subject: Re: Leap second bug?
Date: Mon, 09 Jun 2008 00:00:44 +0200	[thread overview]
Message-ID: <874p8337ub.fsf@gnu.org> (raw)
In-Reply-To: 20080607204054.GA7677@localhost.localdomain

Hi,

Ondrej Zajicek <santiago@crfreenet.org> 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/





  parent reply	other threads:[~2008-06-08 22:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-07 20:40 Leap second bug? Ondrej Zajicek
2008-06-08 19:45 ` Ondrej Zajicek
2008-06-08 22:00 ` Ludovic Courtès [this message]
2008-06-09 14:58   ` Greg Troxel
2008-06-09 17:18     ` Keith Wright
2008-06-10 15:15   ` Jon Wilson
2008-06-10 18:26     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874p8337ub.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).