Overview
| Artifact ID: | d4672b8283f2fc3b8a581ed2392458920e2d5955a54781a7f3b8a847f82f8006 |
|---|---|
| Ticket: | aa082a279c5d3a39d400fd9e8137ba0544422091
clock format "time zone not found" with valid zoneinfo file |
| User & Date: | kenneth.kienle on 2026-09-08 06:12:45 |
Changes
- icomment:
Harald, The backport is on branch bug-aa082a279c-8.6, off core-8-6-branch. The fix is the one Karl proposed in his 2016 comment on this ticket. Pass $date to IsGregorianLeapYear instead of the bare year, and that is also what trunk does today. The credit is his; I only re-derived and tested it. It came up because I build and test Tcl 8.6 in a custom environment, so the suite runs against system tzdata rather than the bundled copy. Karl also warned in that comment that setting gregorian to 1 "may malfunction for dates before September of 1752". That is still true, but it is not caused by these two lines. The same skew is already present on the Mm.n.d path in stock, and it comes from the calendar changeover argument passed further down. One thing worth knowing before taking the branch, making Jn rules work exposes a second, older bug: J59 in a leap year was one day out. FEB_28 is 58, a 0-based day number, but Jn is 1-based, so J59 (28 February) was pushed onto 29 February. Before this backport every Jn rule failed with an error, so nobody could see it. I did not want to make a wrong answer reachable, so the branch corrects that too, in one line, with a test. Trunk has the same bug and nothing here changes trunk. The branch carries six tests, clock-70.1 to 70.6. Reverting one mechanism at a time, measured: the leap-year guard alone fails clock-70.6 and nothing else the date dict argument alone fails all six The second is expected rather than weak coverage. Passing the dict is what makes any Jn rule evaluate at all, so every test depends on it. None of the six needs system or bundled tzdata, and the expected values were computed with glibc. Kenneth - login: "kenneth.kienle"
- mimetype: "text/plain"