chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] bizarre srfi-19 behaviour (maybe DST?)


From: Kon Lovett
Subject: Re: [Chicken-users] bizarre srfi-19 behaviour (maybe DST?)
Date: Mon, 12 Mar 2007 19:18:14 -0700

On Mar 12, 2007, at 11:51 AM, Graham Fawcett wrote:

Hi folks,

I'm puzzled by this behaviour, which I'm only seeing on one of two
Linux machines:

(use srfi-1 srfi-19)
(delete-duplicates
(fold (lambda (n acc) (cons (date-minute (current-date)) acc))
      '() (iota 2000)))

On one machine I get a list of one element, the current minute, eg: => (32)
But on the other machine I'm getting this: => (40 39 38 37 36 35)
Of course, the code is running in subsecond time, so I should see no
more than two values for (date-minute ..) in a given list, and most
likely only one.

The system clock is ok:

(delete-duplicates (map (lambda (n) (current-seconds)) (iota 2000)))
=> (1173724927.0)

The good machine is
Version 2, Build 41 - linux-unix-gnu-x86 - [ dload ptables applyhook ]
The bad one is
 Version 2.5 - linux-unix-gnu-x86 - [ dload ptables applyhook ]

I'm in Canada, and we just moved to daylight-savings time; I can't
tell whether this is a post-DST bug or something else. Thoughts?

Well, your machine is not at fault. At least there was a real bug in '(current-date)'. It was performing dst arithmetic when no tz-locale was supplied. So, yes, caused by the switch to daylight saving time. Thank you for reporting it.

Please get the current srfi-19 egg, version 2.6.1.

Best Wishes,
Kon


Thanks,
Graham


_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users





reply via email to

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