Artifacts Associated With Ticket 2882209
Ticket change [59717ba810] (rid 117979) by dzolli on 2009-10-20 08:38:51:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
% set start 1256421600 % clock format $start Sun Oct 25 00:00:00 CEST 2009 % clock format [clock scan "[clock format $start] +24 hours"] Sun Oct 25 23:00:00 CET 2009 % clock format [clock scan "[clock format $start] +1 day"] Sun Oct 25 23:00:00 CET 2009 % clock format [clock scan "[clock format $start] +2 day"] Mon Oct 26 23:00:00 CET 2009 The first clock scan command "could" be ok, but other results are wrong: at least one hour is missing (time switching from CEST to CET is probably the culprit). the same thing but using [clock add] give good results.
- foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dzolli"
- subsystem initialized to: "16. Commands A-H"
- title initialized to: "clock scan error"
- type initialized to: "Bug"
Ticket change [bee066ac68] (rid 102162) by dzolli on 2009-10-20 15:44:57:
- assignee changed to: "kennykb"
Ticket change [465fce6ecb] (rid 99506) by dkf on 2009-10-21 20:18:24:
- subsystem changed to: "06. Time Measurement"
Ticket change [2c563bd975] (rid 118885) by kennykb on 2009-10-29 07:40:20:
- icomment:
This is an example of why [clock scan] without a '-format' is so very nasty. When you do [clock format [clock scan "[clock format $start] + 1 day"]], what that winds up asking [clock scan] to parse is the string: Sun Oct 25 23:00:00 CEST 2009 + 1 day All goes well with parsing, and we get: year 2009 month 10 day 25 time of day 00:00:00 + 1 day timezone CEST Adjusting the date by 1 day gives year 2009 month 10 day 26 time of day 00:00:00 timezone CEST And - CEST is still in effect here- because it's specified explicitly as the timezone! So even though the specified time is after the Summer Time->Standard Time conversion, it's interpreted in Summer Time and results in a time that's an hour off. But if we try to fix this, it would break the case where we have an input string with a timezone other than the system timezone: Sun Oct 25 00:00:00 EDT 2009 As I mentioned earlier, [clock add] will work. If you need 8.4 compatibility, probably the best option is: clock format [clock scan {+1 day} -base $start] which also gets the right answer, and is shorter and simpler than what you've tried. Also, using any format without a timezone in the inner [clock format] works. % clock format [clock scan "+1 day" -base $start] Mon Oct 26 00:00:00 CET 2009 % clock format [clock scan "[clock format $start -format {%Y-%m-%d %H:%M:%S}] +1 day"] Mon Oct 26 00:00:00 CET 2009 - login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"
- icomment:
Ticket change [942e3da123] (rid 105942) by kennykb on 2009-10-29 07:40:26:
- closedate changed to: "2009-10-29T00:40:26"
- closer changed to: "kennykb"
- foundin changed to: "obsolete: 8.5.7"
- resolution changed to: "Wont Fix"
- status changed to: "Pending"
Ticket change [2a8b8fdc45] (rid 118597) by sf-robot on 2009-11-12 09:20:22:
- closedate changed to: "2009-11-12T02:20:22"
- closer changed to: "sf-robot"
- icomment:
allow_comments - 1 This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
- login: "sf-robot"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "sf-robot"