We are attempting to save a calendar item to a MSG file. We are able to save the item, but the start and end dates aren’t correct. I have attached a project to this post which demonstrates the problem.
Hi,
Thank you for writing to Aspose support team.
I have tried your sample code without any change but could not observe any issue in the output appointment file. This seems to be some environment specific issue. You may please give it a try on some other system using latest version Aspose.Email for .NET 6.0.0 and share the feedback with us.
We’ve updated the earlier project we sent to Aspose Email.Net 6.0. The time displayed in the MSG file is slightly more accurate in that I understand where the value comes from. However, it is still not the value I am expecting.
As you can see in the original image I sent, the appointment is in GMT +8 (Beijing) and occurs between 10-10:30am on December 12.
<t:Start>2015-12-12T10:00:00.000+08:00</t:Start>
<t:End>2015-12-12T10:30:00.000+08:00</t:End>
I set the timezone on my local machine to match. When I run the application and print out the MapiCalendar start and end times, I see that they are correct (10 and 10:30am). I also modified the application to reload the MSG file after it is saved, and verified that the times in fact correct.
However, after opening the MSG file in Outlook 2010, I see that the recurrence is set to be between 2-2:30 am. That value is the GMT time of the meeting. It is not that value I’d expect to see with my local timezone set to be GMT +8.
I have provided the updated project, but really the only substantial change was updating the Aspose Library. I’ve also attached the MSG file (My_Appointment.msg) that I created so you can attempt to open that as well. You can find it in the attached zip file.
Is there any insight you can give as to why to force it to display the local time and not the GMT time?
Hi,
Console.WriteLine("Start Date
(MSG) : " + c.StartDate + ", UTC = " +
c.StartDate.ToUniversalTime());<o:p></o:p>
Console.WriteLine("End Date (MSG) : " + c.EndDate + ", UTC = " + c.EndDate.ToUniversalTime());