[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] time->string
From: |
felix winkelmann |
Subject: |
Re: [Chicken-hackers] time->string |
Date: |
Mon, 21 Jan 2008 04:29:26 +0100 |
On Jan 19, 2008 7:59 PM, John Cowan <address@hidden> wrote:
>
> IMAO, asctime(3) is complete garbage: the fields are output in a
> meaningless order (weekday, month, day, hours, minutes, seconds, year),
> there is no indication of timezone, and the result is not even properly
> localized. The newline is just the maraschino cherry on top of this
> disgusting mess. Even Posix says it is only included for backwards
> compatibility.
I quite agree.
>
> Instead, I suggest making time->string return an ISO 8601 time string of
> the form "yyyy-mm-ddThh:mm:ss+zzzz", where the T is literal and + means +
> or - as the case may be. The zzzz value can be found by calling tzset()
> and examining the external C variable "timezone" declared in <tzset.h>,
> but the value must be negated as the sign is wrong.
I'd rather not mess with date/time issues - this is a tarpit. Besides, the posix
unit is just a wrapper for libc functions, we can repair the most obvious
mistakes.
But, alas: "seconds->string" has of course the same behaviour!
These eggs use it:
./spiffy/trunk/spiffy-base.scm
./spiffy/trunk/simple-directory-handler.scm
./tcp-server/tcpservertest.scm
./ajax/doc.scm
./stream-wiki/trunk/extensions/gallery.scm
./stream-wiki/trunk/extensions/archives.scm
./stream-wiki/trunk/extensions/weblog.scm
./chicken/trunk/chicken-bug.scm
./salmonella/trunk/salmonella.scm
./job-worker/tests/job-worker-test.scm
./release/3/egg-post-commit/post-commit.scm
./release/3/spiffy/trunk/spiffy-base.scm
./release/3/spiffy/trunk/simple-directory-handler.scm
./sbky/bky.scm
So, Peter, Alejandro, Mario: can we make the change?
What about svnwiki?
(it would be nice, if we can clarify this soon, as I'd like
to release 3.0.0)
cheers,
felix