Manifest of check-in
[60c16ebe54]
- Fix relative months and years before the common era, and dates that wrap around in clock add and the julian day helpers (see [f894a85b9a]).
AddMonths added the months to the year of the era, so 1 year after
101 B.C.E. gave 102 B.C.E. It now works with the astronomical year.
The julian day was an int, and TclGetIntFromObj() accepts values up to
UINT_MAX and wraps them around, so clock add with large offsets and the
julian day helpers returned wrapped dates. The julian day is now a
Tcl_WideInt, the helpers calculate in 64 bits, and julian days out of
+-0x7F000000 (about 5.8 million years) raise "integer value too large to
represent". clock format of such seconds is unchanged (clock-61.3).
by
serhiy.storchaka on
2026-11-14 13:10:44.
B b5e7b9386261d05393a975e0007f9e632d3224b0de274b8dcb85236932fb7cb4
C Fix\srelative\smonths\sand\syears\sbefore\sthe\scommon\sera,\sand\sdates\sthat\swrap\saround\sin\sclock\sadd\sand\sthe\sjulian\sday\shelpers\s(see\s[f894a85b9a]).\n\nAddMonths\sadded\sthe\smonths\sto\sthe\syear\sof\sthe\sera,\sso\s1\syear\safter\n101\sB.C.E.\sgave\s102\sB.C.E.\sIt\snow\sworks\swith\sthe\sastronomical\syear.\n\nThe\sjulian\sday\swas\san\sint,\sand\sTclGetIntFromObj()\saccepts\svalues\sup\sto\nUINT_MAX\sand\swraps\sthem\saround,\sso\sclock\sadd\swith\slarge\soffsets\sand\sthe\njulian\sday\shelpers\sreturned\swrapped\sdates.\sThe\sjulian\sday\sis\snow\sa\nTcl_WideInt,\sthe\shelpers\scalculate\sin\s64\sbits,\sand\sjulian\sdays\sout\sof\n+-0x7F000000\s(about\s5.8\smillion\syears)\sraise\s"integer\svalue\stoo\slarge\sto\nrepresent".\sclock\sformat\sof\ssuch\sseconds\sis\sunchanged\s(clock-61.3).\n
D 2026-11-14T13:10:44.840
F generic/tclClock.c b5a307a9ee69efe6bae8be7e4b79a6f56d4b8e5d329722eb21820e8b32bb0efe
F library/clock.tcl ba3bab432b349108b911509486d8428565e426a76a7bc71cf9b45d5ed1cb0702
F tests/clock.test eb04c7fde36405d62a745933d90ea91922e2f8c993b7e60037f6149e5a0742ff
P b5e7b9386261d05393a975e0007f9e632d3224b0de274b8dcb85236932fb7cb4
R 9424defffe900190d900feb7ba1de1a2
T *branch * clock-range-8-6
T *sym-clock-range-8-6 *
T -sym-core-8-6-branch *
U serhiy.storchaka
Z 51a6860441516468a9841aef9c2e7c01