MSG to PDF in Java : timezone problem

Hi,
I have a problem with the MSG to PDf conversion. The datetime indicated in the “Sent” field does not use the local timezone. It is always in GMT. I tried to force the timezone offset but nothing changes.
Here is the code I use :

LOG.debug("[conversionGroupDocs] Email conversion ");
EmailLoadOptions emailLoadOptions = new EmailLoadOptions();
emailLoadOptions.setConvertOwned(false);
emailLoadOptions.setConvertOwner(true);
emailLoadOptions.setTimeZoneOffset((double) 1);
emailLoadOptions.setPreserveOriginalDate(true);
Converter converter = new Converter(chemCompletFicEntree, emailLoadOptions);
PdfConvertOptions options = new PdfConvertOptions();
converter.convert(chemFichierPDFSortie, options);
converter.close();

Thank you for your help

@mlombard

Please share following details and we’ll look into this scenario:

  • Sample MSG file
  • Output/PDF file
  • API version that you are using (e.g. 22.3, 22.8)

Here are the msg and pdf files :
Example.zip (116.2 KB)

I am using the API 22.8.1.

1 Like

@mlombard

Thanks for the details. We are now investigating this issue. Your investigation ticket ID is CONVERSIONJAVA-1847.

@mlombard

This method accepts milliseconds, not hours.
So please use the following:

emailLoadOptions.setTimeZoneOffset((double) 3600000);