Bug 127143 - Time addition short of one second in calc
Summary: Time addition short of one second in calc
Status: RESOLVED DUPLICATE of bug 125580
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.2.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2019-08-25 05:07 UTC by Uwe
Modified: 2019-08-26 12:29 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
test file (16.65 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-08-25 05:10 UTC, Uwe
Details
screenshot (41.71 KB, image/png)
2019-08-25 05:12 UTC, Uwe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe 2019-08-25 05:07:30 UTC
Description:
Adding 5 minutes time intervals by "A_+10/60/24" to "16.07.2019 00:00:00" is short of one second between line 18 and 19. This depends on the actual starting date and fraction of day to be added. Starting with "16.07.1970 00:00:00" or by changing the interval to "A_+10/60/24" time is added correctly.

Steps to Reproduce:
1.Fill in field A1 "16.07.2019 00:00:00"
2.Fill in field A2 "=A1+5/60/24", A3 "=A2+5/60/24" continue accordingly until line 20 or more
3.Observe the interval between line 18 and 19
Additional:
4.Do changes as mentioned in the description above
5.Change starting year to 1990

Actual Results:
For steps 1 to 3:
16.07.19 01:25:00 in line 18
16.07.19 01:29:59 in line 19
---
For step 4:
As expected
---
For step 5:
16.07.90 00:05:00 in line 2
16.07.90 00:09:59 in line 3



Expected Results:
16.07.19 01:25:00 in line 18
16.07.19 01:30:00 in line 19
---
As is
---
16.07.90 00:05:00 in line 2
16.07.90 00:10:00 in line 3



Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
According to libreoffice-forum.de this bug does not occur on LO 5.1.5.2, 6.1.6.3 or excel.
Comment 1 Uwe 2019-08-25 05:10:31 UTC
Created attachment 153624 [details]
test file
Comment 2 Uwe 2019-08-25 05:12:01 UTC
Created attachment 153625 [details]
screenshot
Comment 3 Oliver Brinzing 2019-08-25 08:34:42 UTC
seems to have started with:

https://gerrit.libreoffice.org/plugins/gitiles/core/+/e2e47898180e547cad7ccde1e5890385d573e551

commit e2e47898180e547cad7ccde1e5890385d573e551	[log]
author	Eike Rathke <erack@redhat.com>	
Fri Aug 31 11:21:03 2018 +0200
committer	Eike Rathke <erack@redhat.com>	
Fri Aug 31 12:50:52 2018 +0200
tree c91b4e1e053c69bbf0906953fe1bba276977ef2c
parent 370d4c9ba34913076f7a73a2912eb2e0e48ca73c [diff]

Use tools::Time::GetClock() in number formatter for wall clock time

Also handle rounding/scaling better in ImpGetTimeOutput() for the
[] duration formats, of which [HH]:MM:SS(.0000000) is used to edit
time values.

The wall clock change made it necessary to adapt some test cases in
Test::testUserDefinedNumberFormats() where M_PI formatted to
date+time actually is 1900-01-02 03:23:53.60527 with second 53
instead of the previously rounded 54.

/cygdrive/d/sources/bibisect/bibisect-win32-6.2
$ git bisect bad 3c35d0624c423cd4ccb08340e33de2288f03f4df is the first bad commit
commit 3c35d0624c423cd4ccb08340e33de2288f03f4df
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Fri Aug 31 04:44:34 2018 -0700

    source sha:e2e47898180e547cad7ccde1e5890385d573e551

    source sha:e2e47898180e547cad7ccde1e5890385d573e551

:040000 040000 70cd07a8a294af840f6b5426df0f3f29798e7fa3 06198b34c24a651da6c8455cc818a145b6c23900 M      instdir

/cygdrive/d/sources/bibisect/bibisect-win32-6.2
$ git bisect log
# bad: [35a87a66cfc6dfb661f6fed49fb32c081dd26bc7] source sha:d250c94d78ac7e79753aa30f869db919b01fc450
# good: [b0a56ec98b1368cb5e3e531e0b3f69565af91609] source sha:3a801799536e6870f2fb111b1cc00b9575a35a39
git bisect start 'master' 'oldest'
# bad: [7f7b05d44d7d7f13cc9c865963a72e555b516b3d] source sha:1b88de0a07180661c4d5d6706247d546d06bc983
git bisect bad 7f7b05d44d7d7f13cc9c865963a72e555b516b3d
# good: [893206f564fd73cf737962011484821c90765fd7] source sha:a97411b061a382dc09423d04c633dc9b7d24a737
git bisect good 893206f564fd73cf737962011484821c90765fd7
# good: [5965f05474f5107b79b2ebf7d8c53fb8c7e4d1ac] source sha:40ab9800d3d19eee59571092a9872c8fe9af4e38
git bisect good 5965f05474f5107b79b2ebf7d8c53fb8c7e4d1ac
# good: [37904c252ae7b408ec1f71cbb71269a047cd4965] source sha:1697000180c0674413f1df000ce3348eb4e9691f
git bisect good 37904c252ae7b408ec1f71cbb71269a047cd4965
# bad: [9a81627596d7544443d154afd32695d6ef2808ac] source sha:7c94581151c6427d143bb63fe51fa4b229e0b7e7
git bisect bad 9a81627596d7544443d154afd32695d6ef2808ac
# bad: [24d8e08637355c47b8d52ae6442a71fd82219b8d] source sha:0a9f682de7727e5873323b68405a4aecd785057e
git bisect bad 24d8e08637355c47b8d52ae6442a71fd82219b8d
# good: [21ffaf9230b2d8b2c55cf5c16dbb575d9726795d] source sha:8fbf75895e92f179ecc8a90b90d076552a279285
git bisect good 21ffaf9230b2d8b2c55cf5c16dbb575d9726795d
# bad: [61b1001951f84ce5eb4df9f3db1c5c80ab997e02] source sha:e56eb9cb7ee80215c05d06f25349d7ab7ad06640
git bisect bad 61b1001951f84ce5eb4df9f3db1c5c80ab997e02
# good: [00c7c73d4fbb54752b7ebd82ed5a32e5c5b4b8ce] source sha:4ccac77652d61b823160cac073e3c1bf725352f1
git bisect good 00c7c73d4fbb54752b7ebd82ed5a32e5c5b4b8ce
# good: [dd40df9b82710b193ff348260b6e921131c97d22] source sha:0383ccd4e7116c3d26edc1f86b7a74fe3cf649bd
git bisect good dd40df9b82710b193ff348260b6e921131c97d22
# good: [1b4ea84586792f869e6aeac664772f97e7c0c207] source sha:370d4c9ba34913076f7a73a2912eb2e0e48ca73c
git bisect good 1b4ea84586792f869e6aeac664772f97e7c0c207
# bad: [00d79a3087f841d4d2acb40b7785c17e510ffaf7] source sha:eb199c1b5e8d6039a1969cc6ddb3d627bedf5bd8
git bisect bad 00d79a3087f841d4d2acb40b7785c17e510ffaf7
# bad: [3c35d0624c423cd4ccb08340e33de2288f03f4df] source sha:e2e47898180e547cad7ccde1e5890385d573e551
git bisect bad 3c35d0624c423cd4ccb08340e33de2288f03f4df
Comment 4 m.a.riosv 2019-08-26 11:47:06 UTC
I think a duplicate of https://bugs.documentfoundation.org/show_bug.cgi?id=125580
Comment 5 Oliver Brinzing 2019-08-26 12:29:33 UTC
(In reply to m.a.riosv from comment #4)
> I think a duplicate of
> https://bugs.documentfoundation.org/show_bug.cgi?id=125580

yes, almost certainly a duplicate, should work with:

> For the expected calculation a working approach would be
> =FLOOR(A1+TIME(0;5;0);TIME(0;5;0))
> and pull that down.

*** This bug has been marked as a duplicate of bug 125580 ***