Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8c3afb2a9621582544556b3e8d962ab5d44808cd89da855cce8f96a86c71a43e
Ticket: f2b5f89c0d8520ea86b929daa19ec13fc3a24d2d
clock scan of leapsecond: wrong result in 8.6 and 9.0
User & Date: pooryorick on 2024-11-22 08:14:47
Changes

  1. icomment:
    Nice patch.  However, this might still be introducing an extra complexity for
    no good reason.  If a script is using <code>clock scan</code> with -validate
    in order to validate a time representation, and after validation stores the
    original representation into a persistent database, all other consumers of the
    data must then be prepared to deal with leap second representations. Sqlite,
    for example, is not:
    
    <code><verbatim>
    sqlite> select date('2012-06-30 23:59:00');
    2012-06-30
    sqlite> select date('2012-06-30 23:59:60');
    
    sqlite>
    </verbatim></code>
    
    So in this case another consumer must be prepared for a time representation
    that was already validated by Tcl to evaluate to an empty string in an SQL
    script.  This seems like a footgun.  Sebres, despite the time that you invested
    in preparing this patch, is it really a good idea?  If the answer is yes, and
    this is going to go into Tcl, then given that most applications don't need and
    don't want to deal with leap seconds, should an option like
    <code>-leapseconds</code> be added to activate this behaviour?
    
    Is the new option <code>-strict-leap-sec</code> really necessary?  Given that
    parsing leap second representations is somewhat niche, maybe anyone that wants
    that functionality should just accept the cost of calculating strict leap
    seconds.
    
    I still think that leap seconds are something for a system that calculates
    clock time to be aware of, but not to represent.
    
  2. login: "pooryorick"
  3. mimetype: "text/x-fossil-wiki"