Skip to content
Tcl Source Code History Of Ticket 5116bce4bc0b59b4
Login

History Of Ticket 5116bce4bc0b59b4

Artifacts Associated With Ticket 5116bce4bc0b59b4

  1. Ticket change [8f6843e777] (rid 179614) by ierschterlich on 2020-03-04 15:28:25:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      # The clock values of "2004-03-28 01:00:00" and "2004-03-28 02:00:00" are the same
      (bin) 1 % set date [clock scan "2004-03-28 01:00:00" -format {%Y-%m-%d %H:%M:%S}]
      1080432000
      (bin) 2 % set date [clock scan "2004-03-28 02:00:00" -format {%Y-%m-%d %H:%M:%S}]
      1080432000
      
      # When converting this value back into some readable form, this gives 01:00:00:
      (bin) 13 % clock format 1080432000 -format {%Y-%m-%d %H:%M:%S}
      2004-03-28 01:00:00
      # But when adding 1 hour, this gives 03:00:00 (instead of 02:00:00)
      (bin) 15 % clock format [clock add 1080432000 1 hour] -format {%Y-%m-%d %H:%M:%S}
      2004-03-28 03:00:00
      
    5. foundin initialized to: "ActiveTcl-8.6.9"
    6. is_private initialized to: "0"
    7. login: "ierschterlich"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "0e28191135634e75f723aff349b81d5d0d3df4a9"
    10. resolution initialized to: "None"
    11. severity initialized to: "Severe"
    12. status initialized to: "Open"
    13. submitter initialized to: "ierschterlich"
    14. subsystem initialized to: "16. Commands A-H"
    15. title initialized to:
      clock: the distance between "2004-03-28 01:00:00" and "2004-03-28 03:00:00" is only ONE hour
      
    16. type initialized to: "Bug"
  2. Ticket change [9282e26440] (rid 179629) by sebres on 2020-03-04 17:13:41:

    1. closedate changed to: "2458913.21783734"
    2. closer changed to: "sebres"
    3. icomment:
      <blockquote><i>> The clock values of "2004-03-28 01:00:00" and "2004-03-28 02:00:00" are the same</i></blockquote>
      
      It is time zone related thing, if you don't specify a timezone (or <code>-gmt 1</code>) clock will use default timezone (and I assume you're in CET time zone), and the time <code>02:00:00</code> doesn't exist at 2004-03-28 in this zone at all. It going to DST switch at 02:00 to 03:00, so you are unable to get this time.
      <code><pre style="padding-left:10pt">
      % clock format [expr {1080435599 + 0}] -format {%Y-%m-%d %H:%M:%S}
      2004-03-28 01:59:59
      % clock format [expr {1080435599 + 1}] -format {%Y-%m-%d %H:%M:%S}
      2004-03-28 03:00:00
      </pre></code>
      Either specify UTC/GMT or correct (or validate) the time you want to scan.
      
      At the moment clock scan does not validate the time at all (it is simply adjusted to the near valid time). In the future clock-version we'll hopefully get <code>-valid</code> parameter to enable validation of specified date-time.
      See [3475995] for more information.
      
      <blockquote><i>> When converting this value back into some readable form, this gives 01:00:00... But when adding 1 hour, this gives 03:00:00 (instead of 02:00:00)</i></blockquote>
      
      Sure, because in your timezone it is really so due to DST time switch (see my example above).
      In GMT/UTC it have neither a DST-time hole nor a DST-time jump by such conversion.
      
      Thus closed as incorrect.
      
    4. login: "sebres"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Invalid"
    7. status changed to: "Closed"