[local-time-devel] Confusing behaviour of ADJUST-TIMESTAMP
Maciej Katafiasz
mathrick at gmail.com
Fri Apr 17 13:31:40 UTC 2009
Hi,
I completely fail to understand how ADJUST-TIMESTAMP is supposed to
behave. What I observe is, at best, counterintuitive:
KABINETT-TEST> (today)
;; It's 17th today
@2009-04-17T00:00:00.000000+02:00
KABINETT-TEST> (adjust-timestamp (today) (set :hour to 11))
;; But here it somehow jumps back to 16th, and the hour is set to 13:00 +0200
@2009-04-16T13:00:00.000000+02:00
KABINETT-TEST> (adjust-timestamp (today) (offset :hour by 11))
;; Here it's still 17th, and the hour is 11:00 +0200
@2009-04-17T11:00:00.000000+02:00
The fact that the date changes when I set the hour is very surprising,
as is the fact that it sometimes takes the timezone into account, and
sometimes doesn't. Is that how it's supposed to work? If so, a proper
and detailed explanation (possibly a link to the relevant section of
Naggum's paper; it's very hard to infer what exactly the desired
behaviour is from reading the whole paper without any sort of
connection to the relevant implementation parts) is in order. If not,
consider it a bug report.
Cheers,
Maciej
More information about the local-time-devel
mailing list