Skip to content
Tcl Source Code History Of Ticket 2882209
Login

History Of Ticket 2882209

Artifacts Associated With Ticket 2882209

  1. Ticket change [59717ba810] (rid 117979) by dzolli on 2009-10-20 08:38:51:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. 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.
      
    4. foundin initialized to: "None"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "dzolli"
    10. subsystem initialized to: "16. Commands A-H"
    11. title initialized to: "clock scan error"
    12. type initialized to: "Bug"
  2. Ticket change [bee066ac68] (rid 102162) by dzolli on 2009-10-20 15:44:57:

    1. assignee changed to: "kennykb"
  3. Ticket change [465fce6ecb] (rid 99506) by dkf on 2009-10-21 20:18:24:

    1. subsystem changed to: "06. Time Measurement"
  4. Ticket change [2c563bd975] (rid 118885) by kennykb on 2009-10-29 07:40:20:

    1. 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
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  5. Ticket change [942e3da123] (rid 105942) by kennykb on 2009-10-29 07:40:26:

    1. closedate changed to: "2009-10-29T00:40:26"
    2. closer changed to: "kennykb"
    3. foundin changed to: "obsolete: 8.5.7"
    4. resolution changed to: "Wont Fix"
    5. status changed to: "Pending"
  6. Ticket change [2a8b8fdc45] (rid 118597) by sf-robot on 2009-11-12 09:20:22:

    1. closedate changed to: "2009-11-12T02:20:22"
    2. closer changed to: "sf-robot"
    3. 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).
      
      
    4. login: "sf-robot"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
    7. username: "sf-robot"