[local-time-devel] Timestamp encoding incorrect
Attila Lendvai
attila.lendvai at gmail.com
Wed Jul 22 09:19:06 UTC 2009
> I've found an odd issue with manipulating and generating timestamps using
> LOCAL-TIME. For example, when trying to encode January 1, 2009 as a
> timestamp, I get the following results in SBCL:
>
> PERISCOPE> (encode-timestamp 0 0 0 0 1 1 2009)
> @2008-12-31T23:00:00.000000-05:00
certain operations require that you become aware of the current
timezone, look for &key :timezone and/or :offset arguments. your
example carried out in the UTC zone:
LOCAL-TIME> (decode-timestamp (encode-timestamp 0 0 0 0 1 1 2009
:offset 0) :timezone +utc-zone+)
0
0
0
0
1
1
2009
4
NIL
0
"UTC"
LOCAL-TIME> (timestamp-minimize-part (encode-timestamp 0 0 0 0 1 1
2009 :offset 0) :day :offset 0)
@2009-01-01T01:00:00.000000+01:00
hth,
--
attila
More information about the local-time-devel
mailing list