Bug 134589 - FILESAVE DOCX Timestamp is hardcoded to UTC time zone while it is a local time for creation date
Summary: FILESAVE DOCX Timestamp is hardcoded to UTC time zone while it is a local tim...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.4.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: DOCX File-Properties
  Show dependency treegraph
 
Reported: 2020-07-06 22:07 UTC by virusmater
Modified: 2024-09-30 03:16 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
reproduce of the bug (4.08 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-07-22 07:40 UTC, virusmater
Details

Note You need to log in before you can comment on or make changes to this bug.
Description virusmater 2020-07-06 22:07:25 UTC
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/
Comment 1 Xisco Faulí 2020-07-21 15:11:44 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 2 virusmater 2020-07-22 07:40:18 UTC
Created attachment 163396 [details]
reproduce of the bug

In the attachment:
my current local data time (Europe/Amsterdam) is 09:34
in the document I can see:
<dcterms:created xsi:type="dcterms:W3CDTF">2020-07-22T09:34:54Z</dcterms:created>
2020-07-22T09:34:54Z - is the UTC time format, not the local one.
It should be:
<dcterms:created xsi:type="dcterms:W3CDTF">2020-07-22T07:34:54Z</dcterms:created>
or
<dcterms:created xsi:type="dcterms:W3CDTF">2020-07-22T09:34:54</dcterms:created>
Comment 3 QA Administrators 2020-07-23 03:56:21 UTC Comment hidden (obsolete)
Comment 4 Buovjaga 2021-05-07 15:52:45 UTC
Reproduced

Arch Linux 64-bit
Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 13aaeb5d148c1ea5163eecaa176fac4a67689277
CPU threads: 8; OS: Linux 5.12; UI render: default; VCL: gtk3
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 7 May 2021
Comment 5 Po-Yen Huang 2021-08-24 08:34:23 UTC
I push a possible fix to Gerrit: https://gerrit.libreoffice.org/c/core/+/120561
But some unit test fails, could anyone check how can fix it?
Comment 6 Sophie Sipasseuth 2024-03-02 09:50:36 UTC
Hello virusmater,

Thank you for reporting the bug.
Unfortunately I don't find how check creation timestamp.

In LibreOffice :
22/07/2020, 09:34:54

In PowerShell :
-a---          02/03/2024    10:25           4178 Bug_134589.docx

In the Download folder :
‎samedi ‎2 ‎mars ‎2024, ‏‎10:35:48

Please provide a clearer set of step-by-step instructions on how to reproduce this step.
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the steps are provided

Thanks
Comment 7 QA Administrators 2024-08-30 03:16:00 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2024-09-30 03:16:26 UTC
Dear virusmater,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp