[Libreoffice-bugs] [Bug 127334] Regression: Incompatible changes in date/time arithmetic introduced between Version: 6.0.4.2 (x64) and version 6.2.6.2 (ubuntu)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Jan 7 22:08:59 UTC 2020


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

--- Comment #8 from Mike Kaganski <mikekaganski at hotmail.com> ---
I suppose that some kind of rounding is required to accompany the change of
MINUTE etc. to wall clock, and changes like in bug 125099. Since those changes
are targeted at correctness, but operate on inherently imprecise doubles, the
rounding would define the limit of the precision.

Excel, while also operating on doubles, and naturally accumulating errors at
operations on times, hides that by using rounding. Interestingly, it uses two
different rounding modes: one for cell formatting with fractions of second, and
another for HOUR/MINUTE/SECOND and cell formatting without fractions of second.
Rounding happens in both cases, but in first case it's to 1/1000 of a second,
and in second case (pun not intended) to 1 second.

Given that in our current range of datetimes, the arithmetic precision of + and
- is inside 1/100000 s, whole-seconds precision gives large margin - it would
need at least tens of thousands +- operations for the error to surface. For the
millisecond precision, the margin is also significant.

Possibly implementing the two different modes trying to mimic Excel is not
necessary, but limiting ourselves to ms seems correct, or else seeming
correctness of wall clock hits with issues like this one.

-- 
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/20200107/286f9f34/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list