| Summary: | Calc: time data loose a second when dragged down | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Lucio <campotorondo> |
| Component: | Calc | Assignee: | Eike Rathke <erack> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | medium | ||
| Version: | 7.1.2.2 release | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://bugs.documentfoundation.org/show_bug.cgi?id=136615 https://bugs.documentfoundation.org/show_bug.cgi?id=153517 |
||
| Whiteboard: | target:7.5.0 target:7.4.3 | ||
| Crash report or crash signature: | Regression By: | ||
| Attachments: | screenshot of the Calc spreadsheet with the "incorrect" data | ||
|
Description
Lucio
2022-10-10 19:57:58 UTC
Created attachment 182957 [details]
screenshot of the Calc spreadsheet with the "incorrect" data
That is because date+time values are date serial numbers since the null-date as double floating point values. Let's assume A1: 2022-10-01 00:00:00.000 A2: 2022-10-01 01:00:00.000 with the underlying values (you can see when removing the date+time formatting) A1: 44835 A2: 44835.0416666667 Due to the binary floating point representation the difference A2-A1 is 0.041666666700621136 and not 0.0416666666666667, so a little less than required. Let see if some scaling and rounding would do the trick.. Actually it runs into approxDiff(), the raw diff would be 0.041666666664241347 and obtained is 0.041666666659999997 Eike Rathke committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/abd42a63f65f810c821085149c095682247e0d0d Resolves: tdf#151460 Scale and round time diff fiddling with floating point It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Pending review https://gerrit.libreoffice.org/c/core/+/141222 for 7-4 Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-7-4": https://git.libreoffice.org/core/commit/50baf45b122d4a0e32a5b63cfa5b51606b37bc9e Resolves: tdf#151460 Scale and round time diff fiddling with floating point It will be available in 7.4.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/1b7356e57fbf28a62f10476cebbd45ee369fde17 tdf#151460: sc_ucalc: Add unittest It will be available in 7.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. |