|
From: | Kon Lovett |
Subject: | Re: [Chicken-users] rfc822 |
Date: | Thu, 3 Aug 2006 18:49:38 -0700 |
On Aug 3, 2006, at 6:13 PM, Daishi Kato wrote:
On 8/4/06, Kon Lovett <address@hidden> wrote:> P.S. Can anybody explain why it does "abs" for rem? Probably because tz could be negative & only one breakdown component should carry the sign.I may misunderstand something, but if the tz is -230, it is going to be -5400 instead of -9000. Is it what it should be?
Spoke w/o looking at the code.The expr looks wrong to me. I think this is a better way to get the offset in seconds:
(if (zero? tz) 0 (let ([hr (abs (quotient tz 100))]) [mn (abs (remainder tz 100))]) (* (signum tz) (+ (* hr 3600) (* mn 60)))))
Daishi
[Prev in Thread] | Current Thread | [Next in Thread] |