Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3746fd5d0eea5d4f4bf782ffb2bbb568ce0aa614779210a262e383ba18cd6e05
Ticket: f2b5f89c0d8520ea86b929daa19ec13fc3a24d2d
clock scan of leapsecond: wrong result in 8.6 and 9.0
User & Date: sebres on 2024-11-22 12:37:34
Changes

  1. icomment:
    > If a script is using clock scan with -validate in order to validate a time representation, and after validation stores the original representation into a persistent database
    
    Artificial scenario, IMHO, because nobody would then supply original timestamps in this case, rather resulting unix-time (valid) or some formatted tokens (e. g. in case of sqlite astronomic JD with time fraction like %Ej). 
    But if yes, it is the troubles of related software (you'd not really expect that everything works everywhere equally).
    
    > Is the new option -strict-leap-sec really necessary? 
    
    No. I wanted just to provide possibility to match leap seconds as precise as possible, with -strict-leap-sec 0 (default) it will also accept other potentially leap seconds that are not in the list (what is bad in sense of accuracy, but good for avoidance of error by missing iana-db update).
    
    > I still think that leap seconds are something for a system that calculates clock time to be aware of, but not to represent. 
    
    Yes. Moreover, you cannot represent it with unix-time - in my branch string inputs T235960 and T235959 produce the same result by scan, and it is impossible to produce T235960 with the format back (can only generate T235959).
    
    > That means the current list of 27 entries is final
    
    Fluctuations by Earth's rotation are hardly predictable, so one can only says about probabilities. Yes, the Earth spinning now faster than at any time in the last 50 years, but it can change very fast till 2035.
    
    > Do we really need to generate this list with Tcl-code, and then import it? Wouldn't a simple static array in C suffice? 
    
    I'd prefer to have everything from iana-db in the same place, and load this list on demand (like TZ). At least till 2035, as long as it is still dynamic.
    
    > I really think it doesn't need to be much more complicated than that.
    
    I really want to emphasize that if you decided to support the leap seconds and consider the scan as valid, you have to produce correct result.
    And the timestamp "2012-06-30 23:59:60 UTC" in unix-time is then 1341100799 and not 1341100800 (what would lie chronologically in the next calendar day).<br/>
    And I don't stop to ask you, why you are in mode to continue to prefer a false result to no result (or even to right result, like in my branch)?
    
  2. login: "sebres"
  3. mimetype: "text/x-markdown"