[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] utc-time->seconds and local-time->seconds rationale?
From: |
Michele La Monaca |
Subject: |
Re: [Chicken-users] utc-time->seconds and local-time->seconds rationale? |
Date: |
Tue, 6 May 2014 23:54:35 +0200 |
On a side note, I've noticed these discrepancies on solaris, cygwin and mingw:
(use posix)
(print (time->string (seconds->local-time) "%z")
" -> "
(vector-ref (seconds->local-time) 9))
+0200 -> -7200 (osx, chicken 4.8.0)
+0200 -> -7200 (linux, chicken 4.8.0.3)
+0200 -> -3600 (solaris, chicken 4.8.0.3)
+0200 -> -3600 (cygwin, chicken 4.8.0.3)
+0200 -> -3600 (mingw, chicken 4.8.0.4)
Regards,
Michele
On Sun, May 4, 2014 at 8:44 PM, Michele La Monaca
<address@hidden> wrote:
> Hi,
>
> I am not an expert here, but I find these functions ill-defined.
>
> Both take as input a time-vector which already carries the timezone
> information (seconds west of UTC). So a "time->seconds" function just
> seems the right thing to me. Having to specify the local/utc prefix
> feels redundant, confusing and error-prone:
>
> (local-time->seconds (seconds->utc-time 0)) -3600.0
> (utc-time->seconds (seconds->local-time 0)) 3600.0
>
> Regards,
> Michele