Hi,
MapiMessage.getClientSubmitTime returns the correct time zome, Can I use it instead? Thanks.
Hi Mariusz,
The problem is that the getDate() method returns incorrect date/time when getClientSubmitDate() returns the correct one.
Hi Mariusz,
Thank you for sharing your concern with us.
I was able to reproduce this issue at my end using the version of Aspose.Email for Java 5.0.0 and have logged it as EMAILJAVA-33464 in our issue tracking system for further investigation by our development team. Once there is any information available in this regard, I’ll update you here via this thread.
We are sorry for any inconvenience caused to you.
Can you let me know when that issue can be fixed? It is really urgent for use. Thank you.
Can you please move that issue to the Priority Support?
Thank you,
Mariusz
Hi,
Hi, can you tell me what is the ETA for this issue/new release? Thanks. Mariusz
Hi,
Can you confirm the release date? I can see this issue is still Unresolved and this is really Critical to us. Thank you.
Hi Mariusz,
Hi,
Hi Mariusz,
The build is under QA process now and the new version will be available in a couple of days. We request you to please have a little more patience until the fix version is available for download.
The issues you have found earlier (filed as EMAILJAVA-33464) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
It still doesn’t work correctly.
Email 1:
mapi.getClientSubmitTime() returns Thu Mar 12 15:50:08 CET 2015
message.getDate() returns Thu Mar 12 14:50:08 CET 2015
Email 2:
mapi.getClientSubmitTime() returns Thu May 14 15:56:10 CEST 2015
message.getDate() returns Thu May 14 13:56:10 CEST 2015
Why does it return different time zone and different dates based on the API used? getDate() returns incorrect date as it should be GMT not CEST, both methods returns different time zones?
Thanks in advance for solving that,
Mariusz
Hi Mairusz,
java.util.Date is timezone-independent , therefore it does not maintain the timezone information. The getLocalDate() function can be used to retrieve local date, whereas for GMT time you may use following function:
static String GetGMTTime(Date dt) {
java.util.Calendar cal = Calendar.getInstance();
cal.setTime(dt);
SimpleDateFormat sdf = new SimpleDateFormat("MMM dd, yyyy HH:mm:ss");
String asGmt = sdf.format(cal.getTime()) + " GMT";
return asGmt;
}
public static void TestTime() {
MailMessage mail = MailMessage.load("RE Update on ET# 12766.eml");
System.out.println("GMT Time = " + GetGMTTime(mail.getDate()));
System.out.println("Local Time = " + mail.getLocalDate());
}
Regarding display of wrong string (e.g. CET or CEST) while using getDate() function, we are discussing it with our product team and will share our feedback soon.
You may also have a look at this link 4 for more information on Getting Message Date Time.