[local-time-devel] non-intuitional behavior of adjust-timestamp and timezones
Jaap de Heer
jaap.deheer at streamtech.nl
Mon Feb 8 21:16:53 UTC 2010
Hi Attila,
On Mon, Jan 25, 2010 at 01:35:14PM +0100, Attila Lendvai wrote:
> recently i've been bit by some of the timezone changes. i've recorded
> my expectations in the tests adjust-timestamp/bug[1-3] and also some
> fixes.
>
> i'm not entirely sure it's the right way to go with things, so please
> audit my patches! especially you Mathrick, as you started the original
> cleanup and i'm not sure my changes are inline with what you planned.
When crossing a DST boundary, you now get:
(let* ((*default-timezone* (%realize-timezone (make-timezone :path "/usr/share/zoneinfo/Europe/Amsterdam")))
(stamp (encode-timestamp 0 0 0 0 1 10 2010)))
(print stamp)
(print (adjust-timestamp stamp (offset :month 1))))
@2010-10-01T00:00:00.000000+02:00
@2010-10-31T00:00:00.000000+02:00
Which I think is undesired; previously, and imho correctly, it
yielded:
@2010-10-01T00:00:00.000000+02:00
@2010-11-01T00:00:00.000000+01:00
What problem did you encounter that was fixed by defaulting to
utc? It seems to me that the adjust-timestamp/bug2 test is, and
should be, only true when *default-timezone* is set to some
DST-less timezone like utc.
cheers,
Jaap
More information about the local-time-devel
mailing list