Tcl Source Code

Ticket Change Details
Login
Overview

Artifact ID: c48a5836f8deba3558071b46cedc87ef0026a80e90b0c5c5d3607f8c67eb755e
Ticket: a1bd37b7198f7bf51e8f1f554435045bf6cc8b68
clock (free)scan of ISO 8601 timestamp with literal T behaves strange
User & Date: sebres 2020-05-20 13:17:00
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    It looks like clock free scan recognizes literal "T" in (undocumented?) ISO 8601 timestamp incorrectly, I guess as a legacy (military?) timezone "T".
    <pre style="padding-left:10pt">
    # ISO:
    % clock format [clock scan "20200520 14:40:00" -gmt 1] -gmt 1
    Wed May 20 <b style="color:green">14:40:00</b> GMT 2020
    % clock format [clock scan "20200520T14:40:00" -gmt 1] -gmt 1
    Wed May 20 <b style="color:green">14:40:00</b> GMT 2020
    
    # ISO-similar format:
    % clock format [clock scan "2020-05-20 14:40:00" -gmt 1] -gmt 1
    Wed May 20 <b style="color:green">14:40:00</b>:40:00 GMT 2020
    % clock format [clock scan "2020-05-20T14:40:00" -gmt 1] -gmt 1
    Wed May 20 <b style="color:red">21:40:00</b> GMT 2020
    % clock format [clock scan "2020-05-20 14:40:00  T"    ] -gmt 1
    Wed May 20 <b style="color:red">21:40:00</b> GMT 2020
    </pre>
    This seems not correct in my opinion (despite the documentation says about literal "T" by ISO without "-" separator in date only, recognize "T" as timezone looks weird to me). 
    
    I think either we must aggressively strict the timezones bison/yacc rules (must consider word boundaries or something similar) or ISO format must be extended with YYYY-MM-DD date.
    
  5. foundin changed to: "any"
  6. is_private changed to: "0"
  7. login: "sebres"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "sebres"
  13. subsystem changed to: "- New Builtin Commands"
  14. title changed to:
    clock (free)scan of ISO 8601 timestamp with literal T behaves strange
    
  15. type changed to: "Bug"