Version: Aspose Words Java 20.10
A comment time in MS Word created by exporting an Aspose document does not take into account the difference between time zone set on the machine the document is opened at and the time zone on a server the document export was executed on.
Exact example:
- A server that the application runs on has a time zone set to UTC.
- A document has a comment with dateTime value equal to 19:54 in UTC.
- The document is exported to .docx format.
- The document is opened on a machine having the time zone UTC at 19:54, the MS Word shows that the comment was created a few seconds ago.
- The document is opened on a machine having the time zone UTC+02:00 at 21:54 (that is the same time as 19:54 UTC), the MS Word shows that the comment was created 2 hours ago.
On the contrary to a MS Word file created by itself as a new file and containing a comment, the exported .docx file does not contain a commentsExtensible.xml
file that looks to hold the UTC time reference. This might be the cause of the issue.
The code snippet, exported file aspose-exported-time-1954-UTC.docx
as well as the MS Word created file new-MS-Word-file-time-1657-UTC.docx
are attached in the zip below.
add_comment_wrong_timezone.zip (21.9 KB)