Overview
| Artifact ID: | da3e0ea9078c7ca3de474a50c85f233d69c7806fefd0b82d797a6e0e7dbd5397 |
|---|---|
| Ticket: | 16e4fc30961de5dc969639eaef7354022b683102
year int overflow - clock format of very large date / JD is wrong - if switches into negative value (+24 hours difference). |
| User & Date: | sebres on 2022-08-02 11:35:33 |
Changes
- icomment:
Basically all current tcl-versions overflow after year 5874790: ``` % clock format [set i 185628797193599] -gmt 1 Mon Dec 31 23:59:59 GMT 5874790 % clock format [incr i] -gmt 1 Tue Jan 01 00:00:00 GMT 5874789 ``` The fix in tclclockmod or speedup branches is minimalist, since without large effort it was possible only up to y2e9 (so I set an internal range TCL_MIN_SECONDS to TCL_MAX_SECONDS as ±0x00F0000000000000L), because by some larger values the internal calculation may also overflow (somewhere by the julianday which is signed 32-int now)... ``` % package require tclclockmod % clock format [set i 0x00F0000000000000] -gmt 1 Mon Dec 19 09:04:00 GMT 2140702833 % clock format [incr i] -gmt 1 integer value too large to represent ``` Anyway it is more than 360 times larger than by tcl now (and most important **it would not overflow silently anymore**).
- login: "sebres"
- mimetype: "text/x-markdown"
- private_contact changed to: "da39a3ee5e6b4b0d3255bfef95601890afd80709"
- resolution changed to: "Fixed"
- status changed to: "Pending"