We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

The time zone is not set to “America/New_York”

I found the same issue with this in version 21.2 Java.
Here is my code.

JsonDataLoadOptions options = new JsonDataLoadOptions();
options.setSimpleValueParseMode(JsonSimpleValueParseMode.STRICT);
JsonDataSource dataSource = new JsonDataSource(dsByteStream, options);
CurrentThreadSettings.setTimeZone(TimeZone.getTimeZone("America/New_York"));
CurrentThreadSettings.setLocale(Locale.ENGLISH);
// Open a template document.
Document doc = new Document(docByteStream);
this.engine.buildReport(doc, dataSource, "data");`

The timezone is not set to “America/New_York”, it is set to whichever the timezone the server is located.

E.g the record show the time as 07-01-2021 10:00 AM and the server is in America/Havana. The report show the time at 07-01-2021 2:00 PM.

Can you please let me know if this is a bug?

Thanks

@mtruong

Please try the latest version of Aspose.Words for Java 21.6 and let us know how it goes on your side. Hope this helps you.

If you still face problem, please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach the expected output Word file that shows the desired behavior.
  • Please create a simple Java application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.