Description: Creating a date-hourly span time series; while dragging down the time changes from 00:00 minutes and seconds to 59:59 after circa 12 records. Either on MAC M1 Os12.5 and PC with Intel Core i7 Steps to Reproduce: 1. in a cell write a date with hours and minutes separated by column 2. in the lower cell write the same date with 1 more hour 3. drag down to at least 12 rows to have increment of 1 hour Actual Results: The value of the hour does not increment and the minutes and second become HH:59:59 as if had lost a second. Keep dragging to almost 30 rows one row return to HH:00:00 but 1 hour behind in respect to what expected Expected Results: The hour should have incremented and minutes and second had to stay 00:00 Reproducible: Always User Profile Reset: No Additional Info: See the attachment, I have tried with a Mac OS12:5 and with a PC with WIN 10 Pro
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.