Created attachment 144477 [details] Reproduces time difference calculating error in LibreOffice 6.1.0.3 In my time keep table, I found a bug in calculating of the break time. I attached a document ( reproducing_break_calculating_error.ods) which reproduces this bug. When I open the document in LibreOffice 6.0.6.2: 08:00 18:00 12:30 13:00 0,5 9,5 When opening the document in LibreOffice 6.1.0.3: 08:00 18:00 12:30 13:00 0,483333333333333 9,51666666666667 I used the RPMs from libreoffice.org. Initially I reproduced this on openSUSE Tumbleweed (libreoffice 6.1.0.3-1.3) and openSUSE Leap 15.0 (libreoffice 6.0.4.2-lp150.1.3). Is this bug/behaviour already known?
Regression introduced by: https://cgit.freedesktop.org/libreoffice/core/commit/?id=c69e7266916ac1b8917477fb4eccdb9098da5792 author Winfried Donkers <winfrieddonkers@libreoffice.org> 2018-07-19 12:05:14 +0200 committer Eike Rathke <erack@redhat.com> 2018-07-19 14:01:30 +0200 commit c69e7266916ac1b8917477fb4eccdb9098da5792 (patch) tree 2cbfb1c40fec024a35eb784fc90da9c664672a27 parent ad1fb1c3dfb04e956d8793a320714c1ae1ba5941 (diff) tdf#118800 fix rounding error in Calc function HOUR, MINUTE, SECOND. Bisected with: bibisect-linux64-6.2 Adding Cc: to Winfried Donkers
So it seems we indeed need the extra rounding, but *sometimes* must not. Problem here is that MINUTE(D2-C2) (30 minutes) yields 29 instead of 30. @Jonathan: Apart from that your calculation can be simplified to (for cell E2) =(D2-C2)*24 which yields the correct result, and in cell F2 =(B2-A2)*24-E2 Note that dates and time is measured in days and fractions of day (1 day == 24 hours, 0.5==12h, ...)
Taking.
Thanks Xisco and Eike for your fast response. Do the commits mentioned in https://bugs.documentfoundation.org/show_bug.cgi?id=118800 already fix this issue? Because in the 6.1.0.3 build we use in openSUSE this fix is already in, but the bug is still there: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice For the record the openSUSE downstream bug: https://bugzilla.opensuse.org/show_bug.cgi?id=1106073
(In reply to Jonathan Brielmaier from comment #4) > Do the commits mentioned in > https://bugs.documentfoundation.org/show_bug.cgi?id=118800 already fix this > issue? No, they cause the problem.
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=273b3e10eab70ebc084cb62568bd699fddfb376e Resolves: tdf#119533 reintroduce time rounding but cut, tdf#118800 follow-up It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Pending review https://gerrit.libreoffice.org/59678 for 6-1 https://gerrit.libreoffice.org/59679 for 6-1-1
Verified in Version: 6.2.0.0.alpha0+ Build ID: a922f56cbf25f78534cd2d36bf13a86a4f15d970 CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: threaded @Eike Rathke, Thanks for fixing this!!
I picked up Eike's patch ontop of 6.1.0.3 and can verify that it solves the issue! Version: 6.1.0.3 Build-ID: 10(Build:3) CPU-Threads: 8; BS: Linux 4.12; UI-Render: Standard; VCL: gtk3; Gebietsschema: de-DE (de_DE.UTF-8); Calc: group threaded @Eike and @Xisco: Thanks again for fixing this issue so fast :)
Eike Rathke committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=98cb91686901dc0133c5c23dc5658d9623dbd436 Shortcut small negative values to 0:0:0, tdf#119533 tdf#118800 follow-up It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to Jonathan Brielmaier from comment #9) > @Eike and @Xisco: Thanks again for fixing this issue so fast :) Thanks for reporting and verifying so fast :-)
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=184aee6abd202f6f4e2c18d21f96a0d1a9fd947f&h=libreoffice-6-1 Resolves: tdf#119533 reintroduce time rounding but cut, tdf#118800 follow-up It will be available in 6.1.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Eike Rathke committed a patch related to this issue. It has been pushed to "libreoffice-6-1-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=34887e7a8d36603ade1a0621d511906b826d0298&h=libreoffice-6-1-1 Resolves: tdf#119533 reintroduce time rounding but cut, tdf#118800 follow-up It will be available in 6.1.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://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/47ca84c47b03009fc9be751f1090f583bb3f53b7 tdf#119533: sc_subsequent_filters_test: Add unittest It will be available in 7.1.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.