Conversion to PDF- Sent format nor correct

until 4.2.1 version, the “Sent” format was ok.
The latest version 4.3.0 has “Sent” format problem.

Old version:

New version has wrong format:


Here is my codes:

Calendar c = Calendar.getInstance(timezone); // omit timezone for default tz
c.setTime(message.getDate()); // your date; omit this line for current date
int dateOffsetInt= c.get(Calendar.DST_OFFSET);

int offSetint = Double.valueOf(offset).intValue()+dateOffsetInt;
offset = Double.parseDouble(offSetint + “”);

message.setTimeZoneOffset(offset);

MhtMessageFormatter mhtlFormat = new MhtMessageFormatter();
mhtlFormat.setDateTimeFormat(“EEEE, MMMM dd, yyyy hh:mm:ss a”);
int formatOptions = MhtFormatOptions.HideExtraPrintHeader | MhtFormatOptions.WriteCompleteEmailAddressToMht;
mhtlFormat.format(message, formatOptions);

message.save(baseFolder + htmlFileName, MailMessageSaveType.getMHtmlFormat(), MailMessageSaveOptions.None);

Hi Chang,

Thank you for sharing your concern with us.

I was able to reproduce this issue at my end using the latest version of Aspose.Email for Java 4.3.0 and have logged it as NETWRKJAVA-33395 in our issue tracking system for further investigation by our development team. Once there is any information available in this regard, we'll update you here via this thread.

We are sorry for the inconvenience caused to you.

The issues you have found earlier (filed as NETWRKJAVA-33395) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The format is fixed. But the Sent time is not correct.
I already posted a simple message file last Friday to test. please test the message file or your email file and check the “Sent” time.
The Sent time in the converted PDF is not consistent.
4.4.0 and 4.2.1 have different “Sent” time value.

Here is my code your team gave me:

TimeZone timezone = TimeZone.getTimeZone(“America/Los_Angeles”);
double offset = timezone.getOffset(Calendar.ZONE_OFFSET);
Calendar c = Calendar.getInstance(timezone); // omit timezone for default tz
c.setTime(message.getDate()); // your date; omit this line for current date
int dateOffsetInt= c.get(Calendar.DST_OFFSET);

int offSetint = Double.valueOf(offset).intValue()+dateOffsetInt;
offset = Double.parseDouble(offSetint + “”);
message.setTimeZoneOffset(offset);

MhtMessageFormatter mhtlFormat = new MhtMessageFormatter();
mhtlFormat.setDateTimeFormat(“EEEE, MMMM dd, yyyy hh:mm:ss a”);
int formatOptions = MhtFormatOptions.HideExtraPrintHeader | MhtFormatOptions.WriteCompleteEmailAddressToMht;
mhtlFormat.format(message, formatOptions);
message.save(baseFolder + htmlFileName, MailMessageSaveType.getMHtmlFormat(), MailMessageSaveOptions.None);

Thanks,
Chang Shin


Hi Chang,


Thank you for writing to Aspose support again.

I have tested the sample MSG file and observed the difference in time. A request has been made to the development team to provide their comments. I will write back here as soon as some feedback is received by the developers.

Thank you for your patience and understanding in this regard.


The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan