[Libreoffice-bugs] [Bug 132083] FORMATTING - Wrong date substraction in cell's operation

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Apr 13 21:07:19 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=132083

Mike Kaganski <mikekaganski at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |NOTABUG

--- Comment #7 from Mike Kaganski <mikekaganski at hotmail.com> ---
(In reply to jarko from comment #6)
> In my opinion the problem has been arisen due to conception to prefer fast
> operations over precise results, in any case. Thus, the user is finally 
> responsible for correct calculation. Even for simple addition 2+2...

It is wrong. I already tried to explain the reason for the change. And it has
nothing to do with "fast over precise". The older variant was *less* precise.

But you seem to not realize that the problem here is *wrong format* used.
"Time" is a complex concept. And there are at least two distinct and very
different things. One is *wall clock time*: it is the point in time. Another is
*time span* - that is some length of time, that you get by subtracting two wall
clock times - it is time difference. When you use the latter, you may want to
see something like "128 h 32 m". Working with that, you likely want to round
towards the nearest: if you have 128 h 32 m 42 s, and show up to minutes, you
likely want to see 128 h 33 m. But when you are working with clock wall time,
you see something like "2019-12-31 23:59:59". And you don't want your events
that happened at that moment to be registered in 2020. So *correct* and
*precise* result there is *never* round up, but truncate the display down.

In LibreOffice, you use "HH:MM" for wall clock times, and "[HH]:MM" for time
spans. And the change made them behave according to this model: when you use
wall clock time format, you get truncation (so 2019-12-31 23:59:59.9999999999
that is shown up to minute will be still 2019-12-31 23:59); when you use time
span formats, you get rounding to nearest.

What was proposed in the comment that I mentioned above was that even in wall
clock format we still need to limit the precision, and round to nearest
millisecond. That is just my proposal, and I don't know what problems that
might have, but the idea is to limit this specific kind of problem.

But using "HH:MM" for a cell with "A1-A2" is *conceptually* wrong, and
"[HH]:MM" should be used in this case.

Please stop reopening this, unless you have a strong reason to believe that
this is different from what I described.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200413/7f81b716/attachment.htm>


More information about the Libreoffice-bugs mailing list