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

            Bug ID: 158265
           Summary: Cell Format Date changes cell value in case of high
                    resolution date/time values
           Product: LibreOffice
           Version: 7.3.7.2 release
          Hardware: x86-64 (AMD64)
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Steps to reproduce:
1. Open a calc document
2. Enter an OLE time value with a resolution > 10 ms like 45000.473994479200
3. Format Cell.., select Category Date, set Format Code to 'YYYY-MM-DD
HH:MM:SS.000'. The date will be shown as '2023-03-15 11:22:33.123'
4. close and save the document
5. reopen the document
6. The time value has changed to '2023-03-15 11:22:33.120' = 45000.473994444400

Expected behaviour: Selecting a Date format should not change the value of the
cell

Root Cause: In case of cell format category Date the value is stored with a
resoution of 10 ms only. Compare  'office:date-value="2023-03-15T11:22:33.12"'
and '<text:p>2023-03-15 11:22:33.123</text:p>'

Extract of content.xml after step 4 'close and save'

<table:table-cell table:style-name="ce1" office:value-type="date"
office:date-value="2023-03-15T11:22:33.12" calcext:value-type="date">
<text:p>2023-03-15 11:22:33.123</text:p></table:table-cell>
<table:table-cell table:style-name="ce4"/>

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to