Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 9027bb94a34c9c26f7a89bb6165fb64100c2bced1225880e9df863b19af85532
Ticket: c6f1ffa7a96b949c58b5bae73d6184c6ccbf4b0e
clock scan/freescan deviation (wrong conversion) if TZ specified in the input
User & Date: sebres on 2019-05-09 17:57:43
Changes

  1. icomment:
    And possibly still one case:
    <code><pre style="padding-left:10pt">
    % puts [clock format [clock scan "01/01/1970 00:00:00" -timezone "+0530"] -gmt 1 -locale en]
    <b style="color:green">Wed Dec 31 18:30:00 GMT 1969</b>
    % puts [clock format [clock scan "01/01/1970 00:00:00" -timezone "GMT+05:30"] -gmt 1 -locale en]
    <b style="color:red">Thu Jan 01 05:30:00 GMT 1970</b>
    # ------------------------------
    % puts [clock format [clock scan "01/01/1970 00:00:00" -timezone "+05"] -gmt 1 -locale en]
    <b style="color:green">Wed Dec 31 19:00:00 GMT 1969</b>
    % puts [clock format [clock scan "01/01/1970 00:00:00" -timezone "GMT+05"] -gmt 1 -locale en]
    <b style="color:red">Thu Jan 01 05:00:00 GMT 1970</b>
    % puts [clock format [clock scan "01/01/1970 00:00:00" -timezone "GMT+5"] -gmt 1 -locale en]
    <b style="color:red">Thu Jan 01 05:00:00 GMT 1970</b>
    # ------------------------------
    % puts [clock format 0 -timezone +05 -locale en]
    <b style="color:green">Thu Jan 01 05:00:00 +05 1970</b>
    % puts [clock format 0 -timezone GMT+05 -locale en]
    <b style="color:red">Wed Dec 31 19:00:00 GMT 1969</b>
    % puts [clock format 0 -timezone GMT+05:00 -locale en]
    <b style="color:red">Wed Dec 31 19:00:00 GMT 1969</b>
    </pre></code>
    Something tells me that the TZ are the same (e. g. +05:00 is GMT+05:00) so it should produce the same results.</br>
    And because forwards (format) and backwards (scan) conversions are affected equally, it looks like the loading of the TZ is affected, and red marked are result of invalid sign by the applying of offset of the wrong time zone (prefixed with GMT).
    
  2. login: "sebres"
  3. mimetype: "text/x-fossil-wiki"