Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9282e264405bd5557685a0e64efd0a0afd6fb421f0321267eabf566979b7e387
Ticket: 5116bce4bc0b59b45b7a5473ec01ed12acd83aa6
clock: the distance between "2004-03-28 01:00:00" and "2004-03-28 03:00:00" is only ONE hour
User & Date: sebres on 2020-03-04 17:13:41
Changes

  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"