Reflect Comments Date to Changed Time Zone in Word DOCX Document using Java | Local UTC Date Time

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:

  1. A server that the application runs on has a time zone set to UTC.
  2. A document has a comment with dateTime value equal to 19:54 in UTC.
  3. The document is exported to .docx format.
  4. 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.
  5. 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)

@PROCUREMENT2,

Thank you for providing complete details of this problem. For the sake of any corrections in Aspose.Words API, we have logged this problem in our issue tracking system with ID WORDSNET-21325. We will further look into the details of this problem and will keep you updated on the status of linked issue. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-21325) have been fixed in this Aspose.Words for .NET 21.1 update and this Aspose.Words for Java 21.1 update.