|
2024-11-25
| ||
| 13:02 | Update changes.md. No need to mention [882da1] in changes.md: It was a regression after [aee9f2], wh... check-in: d8e9fe6c29 user: jan.nijtmans tags: trunk, main | |
| 12:12 | • Closed ticket [882da1e28b]: Wrong handling of "24:00" for weekdays... artifact: 6816029293 user: sebres | |
| 11:59 | fixed validation of day of week for 24:00 (move to next day) closes [882da1e28b] check-in: cea877fd7f user: sebres tags: core-8-branch | |
| 11:57 | No need to mention [882da1] in changes.md: It was a regression after [aee9f2], which never was in an... closed check-in: c840ffc3be user: jan.nijtmans tags: bug-882da1e28b | |
|
2024-11-24
| ||
| 19:56 | • Ticket [882da1e28b] Wrong handling of "24:00" for weekdays status ... artifact: 4bbc3bc385 user: jan.nijtmans | |
| 19:55 | • New ticket [882da1e28b]. artifact: 4af9ad5f7f user: jan.nijtmans | |
Wrong handling of "24:00" for weekdays
$ tclsh9.0 % clock scan "Sun 2024-11-24 23:00" 1732485600 % clock scan "Sun 2024-11-24 24:00" unable to convert input string: invalid day of week
This is incorrect. "24:00" is defined by IS0-8601 to be the last moment of the day. 2024-11-24 is still sunday.
Problem introduced with [this commit]. Just before this commit, this happened:
% clock scan "Sun 2024-11-24 23:00" 1732485600 % clock scan "Sun 2024-11-24 24:00" 1732489200
Which is correct: 2024-11-24 is on a sunday!
So, I object to the part of the change which caused this.
cea877fd7ffixed validation of day of week for 24:00 (move to next day) closes [882da1e28b] check-in2024-11-25 11:59:54
Fixed in [cea877fd7fecc625]. Thx for finding.
As for removed correction of julian day in case of 24:00 - it was not quite correct to retain the previous day, since it'd be used in further calculations, especially if we're in other TZ as GMT/UTC, especially if we'd have a DST time switch or TZ-offset change in the TZ exactly at this time, and since 24:00 is basically next day, everything shall move to the next day (resulting unix-time is in UTC)...
I think the adjustment of day of week like [cea877fd7fecc625] is only right way. Other tokens may follow (if we'd need to validate week of the year or julian day for some reason tomorrow).