Created attachment 129115 [details]
I have a document that subtracts to timestamps (B2-A2), yielding C2 (which looks correct). Then I multiply C2 (yellow) by D2, giving E2 (orange) which does not look correct (value too small).
However when I enter the value output as C2 into B22 (yellow), the value D2 into C22, and multiply both, yielding D22, the result (green) looks correct.
This looks very much like a bug to me, and if so, it looks like a new bug.
Created attachment 129116 [details]
File written by Microsoft Excel
When I read the file from attachment 129115 [details] with Microsoft Excel, it complained, displaying some fields with "N/V". After reentering the formulas display looked OK, and when I entered B2 as "29.10.16 24:00", it was displayed as "29.10.16 00:00", and the result was OK! So I saved it as ODS.
Now when loading that file, the results are correct in Calc, also!
(In reply to Ulrich Windl from comment #1)
> (...), and when I entered B2 as "29.10.16 24:00", (...) the result was OK!
Also when I enter 29.10.16 00:00" in B2, the result is still correct, of course.
A2 is greater than B2 (2016-10-28 14:05:00 and 2016-10-28 00:00:00) so =B2-A2 gives a negative value which you formatted as wall clock time instead of duration. Using format code [HH]:MM:SS instead on C2 will show -14:05:00 and for E2 (=C2*D2) -16:11:45
(In reply to Eike Rathke from comment #3)
> A2 is greater than B2 (2016-10-28 14:05:00 and 2016-10-28 00:00:00) so
> =B2-A2 gives a negative value which you formatted as wall clock time instead
> of duration. Using format code [HH]:MM:SS instead on C2 will show -14:05:00
> and for E2 (=C2*D2) -16:11:45
I don't understand: The difference from "28.10.16 14:05" to "28.10.16 00:00" is correctly displayed as "09:55:00"; what is not correct is the product of 1.2 times the duration ("09:55:00"). That works in D22. So effectively I see two different results for the same formula. Something must be wrong! Why isn't the default time format "[HH]:MM:SS" then?
(In reply to Ulrich Windl from comment #4)
> I don't understand: The difference from "28.10.16 14:05" to "28.10.16 00:00"
> is correctly displayed as "09:55:00"; what is not correct is the product of
The difference is -14:05:00, not 09:55:00.
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":
tdf#86395 tdf#104253 tdf#147658 tdf#135043 SwNavigator sort enhancement
It will be available in 7.4.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:
Affected users are encouraged to test the fix and report feedback.
I think the commit message in comment 6 is a mistake.