|
2025-11-17
| ||
| 16:56 | merge 9.0 (fixes clock validation bug [2a1d947d8c13506d]) check-in: 0362334dfe user: sebres tags: trunk, main | |
| 16:46 | fixes validation bug [2a1d947d8c13506d] - update gregorian flag during validation, before checking d... check-in: fc87afd254 user: sebres tags: core-8-branch | |
| 16:36 | • Closed ticket [2a1d947d8c]: Possible clock regression considering Julian-Gregori... artifact: d4d86dd313 user: sebres | |
| 16:30 | fixes validation bug [2a1d947d8c13506d] - update gregorian flag during validation, before checking d... check-in: 309b28d3f5 user: sebres tags: core-9-0-branch | |
|
2025-11-14
| ||
| 18:56 | • Ticket [2a1d947d8c] Possible clock regression considering Julian-Gregorian trans... artifact: bd5b927417 user: sebres | |
| 18:51 | fixes validation bug [2a1d947d8c13506d] part 1 - update gregorian flag during validation, before che... check-in: a40aa78ddd user: sebres tags: bug-2a1d947d8c13506d-clock-valid-julian-cal | |
| 18:48 | test illustrating incorrect handling of julian-gregorian transition (validation bug nr.1 in [2a1d947... check-in: c46636b3e3 user: sebres tags: bug-2a1d947d8c13506d-clock-valid-julian-cal | |
| 18:43 | • Ticket [2a1d947d8c] Possible clock regression considering Julian-Gregorian trans... artifact: 646f1e9516 user: sebres | |
| 18:42 | • New ticket [2a1d947d8c]. artifact: 355136d660 user: sebres | |
Possible clock regression considering Julian-Gregorian transition incorrect
1. Validation seems to miss changing of Gregorian flag in some circumstances:
$ tclsh8.6
% puts [set d [clock scan "29.02.1700" -format {%d.%m.%Y} -gmt 1 -locale en]]
-8514374400
% puts [clock format $d -format {%d.%m.%Y} -gmt 1 -locale en]
29.02.1700
$ tclsh9
% puts [set d [clock scan "29.02.1700" -format {%d.%m.%Y} -gmt 1 -locale en]]
unable to convert input string: invalid day
% puts [set d [clock scan "29.02.1700" -format {%d.%m.%Y} -gmt 1 -locale en -valid 0]]
-8514374400
% puts [clock format $d -format {%d.%m.%Y} -gmt 1 -locale en]
29.02.1700
2. There is a 8.6 -> 9 difference on free form scanning around year 1752:
$ tclsh8.6
% clock format [clock scan "9/1/1752 1 day ago"] -format %d
11
$ tclsh9
% clock format [clock scan "9/1/1752 1 day ago"] -format %d
31
Commit [a40aa78ddd710f15] (branch bug-2a1d947d8c13506d-clock-valid-julian-cal) fixes part 1 of the issue.
As for part 2, I'm still unsure 8.6 handled it correctly (or rather I would like to understand what happened there, so one could analyze its validness).
Part 1 is fixed in [309b28d3f5335753] for 9.x.
Regarding part 2, it looks like a bug in freescan of 8.x, because formatted scan returns it like in new clock (where freescan and fmt-scan are more similar and completely equivalent by all conversions):
% clock format [clock scan "9/1/1752" -gmt 1 -format %m/%d/%Y] -format %m/%d/%Y -gmt 1
09/01/1752
% clock format [clock scan "9/1/1752" -gmt 1 ] -format %m/%d/%Y -gmt 1
09/12/1752
Thus closed.