[Libreoffice-bugs] [Bug 134589] New: Timestamp is hardcoded to UTC while it is a local time for docx creation date

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Jul 6 22:07:25 UTC 2020


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

            Bug ID: 134589
           Summary: Timestamp is hardcoded to UTC while it is a local time
                    for docx creation date
           Product: LibreOffice
           Version: 6.4.4.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: LibreOffice
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: virusmater at gmail.com

Description:
Let's say I'm in CET timezone, 15:00 local time. I create new Writer document
and save it as .docx (2007-365). Then I open it as archive and go to:

docProps > core.xml

there I can see:

<dcterms:created
xsi:type="dcterms:W3CDTF">2020-07-06T15:00:00Z</dcterms:created>

but this is wrong, since the date has Z on the end it means that this is UTC
timestamp. it should be like this:

<dcterms:created
xsi:type="dcterms:W3CDTF">2020-07-06T13:00:00Z</dcterms:created>

or just timezone naive:

<dcterms:created
xsi:type="dcterms:W3CDTF">2020-07-06T15:00:00</dcterms:created>

because of this some libraries, as python-docx, may have issues with timezones.

same goes for the review comments: LibreOffice saves it as local time, but adds
UTC 'Z' to the timestamp.

Microsoft Office works differently and just put timestamps in the naive way
inside (for comments) or in proper timezone (for creation date)


Steps to Reproduce:
1.Create new Writer doc
2.Export to docx
3.Open it as archive
4.Check creation timestamp


Actual Results:
<dcterms:created
xsi:type="dcterms:W3CDTF">2020-07-06T15:00:00Z</dcterms:created>

Expected Results:
<dcterms:created
xsi:type="dcterms:W3CDTF">2020-07-06T15:00:00</dcterms:created>


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Link to the forum:
https://ask.libreoffice.org/en/question/253816/timezone-of-creation-date-for-docx-file/

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200706/39a70733/attachment.htm>


More information about the Libreoffice-bugs mailing list