Bug 122991 - FORMATTING: Regression from 6.1 to 6.2 in displaying times formatted as Time 876613:37:46
Summary: FORMATTING: Regression from 6.1 to 6.2 in displaying times formatted as Time ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.3.0 target:6.2.1 target:7.2.0
Keywords: bibisected, bisected, regression
: 123247 123365 123423 123572 123584 123788 123889 123900 123924 123952 124047 124085 124303 124444 (view as bug list)
Depends on:
Blocks: 121978
  Show dependency treegraph
 
Reported: 2019-01-26 13:53 UTC by ks
Modified: 2021-05-21 09:37 UTC (History)
18 users (show)

See Also:
Crash report or crash signature:


Attachments
Example for wrong Time data in 6.2/6.3, correct in 6.0/1 (7.44 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-01-26 13:53 UTC, ks
Details
difference between lo 4.1.5 and lo 6.3 (41.00 KB, image/png)
2019-01-26 15:19 UTC, Oliver Brinzing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ks 2019-01-26 13:53:19 UTC
Created attachment 148674 [details]
Example for wrong Time data in 6.2/6.3, correct in 6.0/1

Loading a spread sheet for calculating work hours createt w/ LO 6.0.xxx in 6.2.xxx or 6.3.xxx some values are shown as f.e. 08:47:59 instead of 08:48:00 and all further calculations are done with the wrong values. I've to stay with 6.1.xxx until this is fixed.

How to repeat: Open a new spreadsheet, format some cells as Time 876613:37:46 and just type 8:47, you'll see 8:46:59.

Worse: After saving the sheet in 6.2.xxx/6.3.xxx to file and opening the file again, you'll see more values beeing shown as X:YZ-1:59 instead of Z:YZ:00.

BUT: Open the same File in LO 6.1.xxx an all values are OK!

See attached example file.

(FWIW: I've removed all extensions)
Comment 1 Oliver Brinzing 2019-01-26 15:19:41 UTC
Created attachment 148678 [details]
difference between lo 4.1.5 and lo 6.3
Comment 2 Oliver Brinzing 2019-01-26 15:29:19 UTC
reproducible with 

Version: 6.1.5.1 (x64)
Build ID: f18954c1ba9116b85c32b6bdbc0188d3e0fd24c7
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: de-DE (de_DE); Calc: 

and

Version: 6.3.0.0.alpha0+ (x64)
Build ID: ab9ea7f10e259e9d49bba72797fc7b252ab70868
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

Version: 6.2.0.2 (x64)
Build-ID: 2ce5217b30a543f7666022df50f0562f82be0cff
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: 

xml representation e.g. for cell F8 is:

<table:table-cell table:style-name="ce1" office:value-type="time"
 office:time-value="PT08H47M00S" 
 calcext:value-type="time">
    <text:p>08:47:00</text:p>
</table:table-cell>
Comment 3 Oliver Brinzing 2019-01-26 15:35:02 UTC
maybe introduced with fix for:

Problem with new function SECOND
https://bugs.documentfoundation.org/show_bug.cgi?id=121978
Comment 4 Oliver Brinzing 2019-01-26 15:39:44 UTC
(In reply to ks from comment #0)
 
> How to repeat: Open a new spreadsheet, format some cells as Time
> 876613:37:46 and just type 8:47, you'll see 8:46:59.

reproducible with lo 6.2.0.2 and cell format:
 [HH]:MM:SS -> 08:47:59
but not with cell format:
 HH:MM:SS   -> 08:48:00
Comment 5 Oliver Brinzing 2019-01-27 12:35:57 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.

Change-Id: I242a6c753a24281e041d3f73af019bdd77c65b37
Reviewed-on: https://gerrit.libreoffice.org/59857
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
    include/svl/zformat.hxx[diff]
    svl/qa/unit/svl.cxx[diff]
    svl/source/numbers/zformat.cxx[diff]
 3c35d0624c423cd4ccb08340e33de2288f03f4df is the first bad commit
commit 3c35d0624c423cd4ccb08340e33de2288f03f4df
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Fri Aug 31 04:44:34 2018 -0700
    source e2e47898180e547cad7ccde1e5890385d573e551
    source e2e47898180e547cad7ccde1e5890385d573e551

:040000 040000 70cd07a8a294af840f6b5426df0f3f29798e7fa3 06198b34c24a651da6c8455cc818a145b6c23900 M      instdir

/cygdrive/d/sources/bibisect/bibisect-win32-6.2
$ git bisect log
# bad: [d60ae8383378fcecc7ab077670bf45208a214c71] source e45c30858dec1dd705b9144fab981a3c8819ba96
# good: [b0a56ec98b1368cb5e3e531e0b3f69565af91609] source 3a801799536e6870f2fb111b1cc00b9575a35a39
git bisect start 'master' 'oldest'
# good: [5180a3b7a5dc530ad7ec5bd6e5cefecf85beab7e] source 8bcc4a98d78869d6839821b9747602777f00ebaf
git bisect good 5180a3b7a5dc530ad7ec5bd6e5cefecf85beab7e
# good: [5180a3b7a5dc530ad7ec5bd6e5cefecf85beab7e] source 8bcc4a98d78869d6839821b9747602777f00ebaf
git bisect good 5180a3b7a5dc530ad7ec5bd6e5cefecf85beab7e
# bad: [1473ee9b216ec27c5410a08036aef0a4b857841c] source 93c817971d76ff5020d4210229896a35d357a371
git bisect bad 1473ee9b216ec27c5410a08036aef0a4b857841c
# bad: [0942649607862f8e681eeeb027ead35246eeee6f] source d784612ff788f688eebb851c800228fc01c60470
git bisect bad 0942649607862f8e681eeeb027ead35246eeee6f
# bad: [f8b7df8260b2b21ea776ddda0480d4ecde928aeb] source a9bcbd3dad16c69f1e7ebb52a30611150a49f298
git bisect bad f8b7df8260b2b21ea776ddda0480d4ecde928aeb
# bad: [7f9fa743bc9ed65ad739fe9218babd841e0f22fb] source d587931fba77246db3a2ccc6ab61ca77446d23f4
git bisect bad 7f9fa743bc9ed65ad739fe9218babd841e0f22fb
# good: [e71cd9ebf21b8ce53c5ff534474ea996450c11da] source f4a9ce33415a85d0b86ced3a0bf780f4ec61e25f
git bisect good e71cd9ebf21b8ce53c5ff534474ea996450c11da
# bad: [6bc07af508f6319be42be8a2ea57e2b641c60fc4] source 21f52dc70e0f74adc559375f560dff969b9498de
git bisect bad 6bc07af508f6319be42be8a2ea57e2b641c60fc4
# good: [f1c39124a69c08ee40b71ac0a8a00797dfb3e036] source 3e42e545176a7bfe31fc687ec9ab47db517725eb
git bisect good f1c39124a69c08ee40b71ac0a8a00797dfb3e036
# bad: [344f85171ae55a40653b8b680c20dd2a1c6e8599] source 8eca83829b21bf17f6a83b87df38862eab490b30
git bisect bad 344f85171ae55a40653b8b680c20dd2a1c6e8599
# good: [049b627b927fd4878a0a8137bbf66254886bb23f] source 8eafa504e99bdf946e006527092d1974f18b66cc
git bisect good 049b627b927fd4878a0a8137bbf66254886bb23f
# bad: [00d79a3087f841d4d2acb40b7785c17e510ffaf7] source eb199c1b5e8d6039a1969cc6ddb3d627bedf5bd8
git bisect bad 00d79a3087f841d4d2acb40b7785c17e510ffaf7
# bad: [3c35d0624c423cd4ccb08340e33de2288f03f4df] source e2e47898180e547cad7ccde1e5890385d573e551
git bisect bad 3c35d0624c423cd4ccb08340e33de2288f03f4df
# good: [1b4ea84586792f869e6aeac664772f97e7c0c207] source 370d4c9ba34913076f7a73a2912eb2e0e48ca73c
git bisect good 1b4ea84586792f869e6aeac664772f97e7c0c207
# first bad commit: [3c35d0624c423cd4ccb08340e33de2288f03f4df] source e2e47898180e547cad7ccde1e5890385d573e551
Comment 6 Telesto 2019-01-27 13:00:13 UTC
Adding CC: to Eike Rathke
Comment 7 Eike Rathke 2019-01-28 11:16:38 UTC
Investigating.
Comment 8 Commit Notification 2019-01-28 19:03:51 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/31d3369803ce4eceab5ef708f2cd33748b6d10ea%5E%21

Resolves: tdf#122991 do not truncate time duration [] format values

It will be available in 6.3.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.
Comment 9 Eike Rathke 2019-01-28 19:04:15 UTC
Pending review https://gerrit.libreoffice.org/67030 for 6-2
Comment 10 Commit Notification 2019-01-29 10:03:41 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/10417db7f0b840d6494163876a73a0067b71f32e%5E%21

Resolves: tdf#122991 do not truncate time duration [] format values

It will be available in 6.2.1.

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.
Comment 11 Xisco Faulí 2019-01-29 10:25:21 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: 6d5af783bfd899253908c926853233a99df6f4e0
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Eike, thanks for fixing this!!
Comment 12 Oliver Brinzing 2019-02-08 17:47:45 UTC
*** Bug 123247 has been marked as a duplicate of this bug. ***
Comment 13 Oliver Brinzing 2019-02-11 17:36:41 UTC
*** Bug 123365 has been marked as a duplicate of this bug. ***
Comment 14 documentfoundation.org 2019-02-13 20:55:45 UTC
*** Bug 123423 has been marked as a duplicate of this bug. ***
Comment 15 Eike Rathke 2019-02-19 14:47:30 UTC
*** Bug 123572 has been marked as a duplicate of this bug. ***
Comment 16 m_a_riosv 2019-02-20 21:45:38 UTC
*** Bug 123584 has been marked as a duplicate of this bug. ***
Comment 17 Oliver Brinzing 2019-03-01 17:52:19 UTC
*** Bug 123788 has been marked as a duplicate of this bug. ***
Comment 18 Aron Budea 2019-03-06 22:59:42 UTC
*** Bug 123900 has been marked as a duplicate of this bug. ***
Comment 19 Aron Budea 2019-03-06 23:00:29 UTC
*** Bug 123889 has been marked as a duplicate of this bug. ***
Comment 20 Aron Budea 2019-03-07 13:35:59 UTC
*** Bug 123924 has been marked as a duplicate of this bug. ***
Comment 21 raal 2019-03-09 08:23:19 UTC
*** Bug 123952 has been marked as a duplicate of this bug. ***
Comment 22 Xisco Faulí 2019-03-13 21:27:50 UTC
*** Bug 124047 has been marked as a duplicate of this bug. ***
Comment 23 Xisco Faulí 2019-03-14 18:49:46 UTC
*** Bug 124085 has been marked as a duplicate of this bug. ***
Comment 24 Mike Kaganski 2019-03-24 06:50:40 UTC
*** Bug 124303 has been marked as a duplicate of this bug. ***
Comment 25 Oliver Brinzing 2019-03-30 15:10:10 UTC
*** Bug 124444 has been marked as a duplicate of this bug. ***
Comment 26 Commit Notification 2021-05-21 09:37:21 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e95bafd4bf9e8159d5d58af413848c64aeed571a

tdf#122991: svl_qa_cppunit: Add unittest

It will be available in 7.2.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.