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)
(earliest affected) release
Hardware: All All
: medium minor
Assignee: Not Assigned
Depends on: 127170
Blocks: Number-Format
  Show dependency treegraph
Reported: 2019-09-10 12:33 UTC by Albrecht Müller
Modified: 2023-02-28 03:19 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

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

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 If you use Version: (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.

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
Comment 5 Albrecht Müller 2020-04-23 19:00:57 UTC
Created attachment 159870 [details]
Example file created using Linux version
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
Dear Albrecht Müller,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team