Overview
| Artifact ID: | f095a03ea563cfd276f8143168b59fff3a8b50ad9a58c4e624baf8c04b4fc17e |
|---|---|
| Ticket: | f2b5f89c0d8520ea86b929daa19ec13fc3a24d2d
clock scan of leapsecond: wrong result in 8.6 and 9.0 |
| User & Date: | jan.nijtmans on 2024-11-14 16:47:34 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-wiki"
- comment changed to:
First, have a look at Tcl 8.7: <pre> $ tclsh8.7 % clock scan "2012-06-30 23:59:59" -gmt 1 1341100799 % clock scan "2012-06-30 23:59:60" -gmt 1 1341100800 </pre> This is correct. The 30th of june in 2012 had a leap second, so it - indeed - had a sixtieth second. Now Tcl 9.0: <pre> $ tclsh9.0 % clock scan "2012-06-30 23:59:59" -gmt 1 1341100799 % clock scan "2012-06-30 23:59:60" -gmt 1 unable to convert input string: invalid time </pre> Understandable, but incorrect: this is a valid timestamp. See: [https://en.wikipedia.org/wiki/Leap_second|Leap_second] Finally, Tcl 8.6: <pre> $ tclsh8.6 % clock scan "2012-06-30 23:59:59" -gmt 1 1341100799 % clock scan "2012-06-30 23:59:60" -gmt 1 1341014399 % clock format 1341014399 -gmt 1 Fri Jun 29 23:59:59 GMT 2012 </pre> So, adding a single second ends up on the previous day.
- foundin changed to: "8.6, 9.0"
- is_private changed to: "0"
- login: "jan.nijtmans"
- priority changed to: "5 Medium"
- private_contact changed to: "0c50e5320704d174412e57b873d8932de15303e0"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "jan.nijtmans"
- subsystem changed to: "16. Commands A-H"
- title changed to:
clock scan of leapsecond: wrong result in 8.6 and 9.0
- type changed to: "Bug"