Bug 127473 - Regression: Formatting error using format "TT.MM.JJJJ HH:MM:SS,000000000000000000"
Summary: Regression: Formatting error using format "TT.MM.JJJJ HH:MM:SS,00000000000000...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.4.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 127170
Blocks: Number-Format
  Show dependency treegraph
 
Reported: 2019-09-10 12:33 UTC by Albrecht Müller
Modified: 2025-03-09 21:32 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file created using Windows version 6.0.4.2 (13.87 MB, application/vnd.oasis.opendocument.spreadsheet)
2020-04-23 18:57 UTC, Albrecht Müller
Details
Example file created using Linux version 6.3.5.2 (6.10 MB, application/vnd.oasis.opendocument.spreadsheet)
2020-04-23 19:00 UTC, Albrecht Müller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Albrecht Müller 2019-09-10 12:33:16 UTC
Description: Using format "TT.MM.JJJJ HH:MM:SS,000000000000000000" values that have a zero fractional part get formatted with fewer digits in the fractional part than those whose fractional part is non-zero. Of course, using this kind of format is not a common use case. I stumbled on this while analysing round-off errors in the context of bug 127334.

How to reproduce:
- Open a new spreadsheet
- Make column A wide enough so it can display the formatted values
- Select column A, i.e. the cells A1:A1048576
- Set the number format of this cell range to "TT.MM.JJJJ HH:MM:SS,000000000000000000"
- Fill the range with time values starting vom 10.9.2019 using a time increment of 0.1 seconds. For this purpose open "Tabelle -> Zellen ausfüllen -> Reihen". Set "Reihentyp" to "Linear", "Anfangswert" to "10.9.2019" and "Zunahme" to "00:00:00,1". Press ok. It takes a few moments until the values will show up.

Actual behaviour: The representation of the values representing full seconds is by three digits shorter than that of the other values when using version 6.2.6.2. If you use Version: 6.0.4.2 (x64) all representations use the same length except that in cell A1 where the last three digits are replaced by squares (probably indicating illegal characters).

Expected behaviour: The representation of all values should use the same number of digits.
Comment 1 m_a_riosv 2019-09-11 11:51:29 UTC
Please attach a sample file.
Comment 2 Albrecht Müller 2019-09-11 19:58:14 UTC
For roughly the same reasons I explained in https://bugs.documentfoundation.org/show_bug.cgi?id=127476#c2 I do not want to upload an example file. The real problems are bug 127334 and bug 127477. I mentioned this bug so someone that cares about bug 127334 may keep an eye on this and may occasionally fix it. Note: The time the light needs to travel the size of an atom is longer than the durations that this format allows to express. That is not something I usually have to deal with.
Comment 3 Buovjaga 2020-04-19 15:42:38 UTC
Sample file is required.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 4 Albrecht Müller 2020-04-23 18:57:30 UTC
Created attachment 159869 [details]
Example file created using Windows version 6.0.4.2
Comment 5 Albrecht Müller 2020-04-23 19:00:57 UTC
Created attachment 159870 [details]
Example file created using Linux version 6.3.5.2
Comment 6 m_a_riosv 2020-04-23 20:10:56 UTC
I don't know what the bug is, you are going beyond limits with decimal places. Precision in calc is limited to fifteen numbers plus sing, incluiding decimal places, In fact reducing decimal places to fifteen doesn't show the supposed issue.
Comment 7 Albrecht Müller 2020-04-25 17:51:55 UTC
Previous versions of LibreOffice showed a different behaviour when you went beyond the limit with decimal places. I studied this behaviour in the context of bug 127334. So I reported the changed behaviour in the hope that this may provide insights helpful for fixing this bug.

Nevertheless I think the observed behaviour is a bug of its own right: LibreOffice should either disable the use of so many decimal places or show a consistent and documented behaviour if it allows formats like this - they may be sometimes useful. A decision which option to choose could be made in the context of an ongoing clarification process (bug 127170).
Comment 8 Buovjaga 2020-04-29 10:53:16 UTC
Ok, discussed with Mike K. and he said we should keep this open
Comment 9 b. 2021-02-27 17:06:17 UTC
it's more an oddity than a bug, but, @Albrecht Müller is right (and has sharp eyes) it doesn't have to and shouldn't be like this, the less such inconsistencies develop the less stupid questions arise, and the less confusion is injected into other procedures

not astonishing it's not only TT.MM.JJJJ HH:MM:SS,000000000000000000 affected but also 
TT.MM.JJJJ HH:MM:SS,00000000000000000  
TT.MM.JJJJ HH:MM:SS,0000000000000000 
TT.MM.JJJJ HH:MM:SS,0000000000000000000
TT.MM.JJJJ HH:MM:SS,00000000000000000000
and formats with differenct 'day part' like JJJJ-MM-TT (YYYY-MM-DD) too
Comment 10 QA Administrators 2023-02-28 03:19:48 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2025-02-28 03:11:47 UTC Comment hidden (obsolete)
Comment 12 Daniel Baran 2025-03-09 21:32:25 UTC
I'm seeing what appears to be the same result as the original report
using the following LO version. A snippet of the display is included.

Version: 25.2.1.2 (X86_64) / LibreOffice Community
Build ID: d3abf4aee5fd705e4a92bba33a32f40bc4e56f49
CPU threads: 12; OS: Windows 11 X86_64 (10.0 build 26100); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded


From attachment file 159870:

10.09.2019 00:00:00.800000000000000000
10.09.2019 00:00:00.900000000000000000
10.09.2019 00:00:01.000000000000000
10.09.2019 00:00:01.100000000000000000