Hi Aspose
Evaluating Aspose.Email for Java 4.3.0, I try to load an ICS file which specifies UTC time into a PST, using the code below;
String pathPSTFileStr = "c:\\temp\\testPST.pst";
String testFile = "c:\\temp\\test.ics";
PersonalStorage pst = PersonalStorage.create(pathPSTFileStr, 0);
Appointment calDoc = Appointment.load(testFile);
MailMessage calMsg = new MailMessage();
calMsg.addAlternateView(calDoc.requestApointment());
MapiMessage calMapiMsg = MapiMessage.fromMailMessage(calMsg);
FolderInfo calFolder = pst.createPredefinedFolder("Calendar", StandardIpmFolder.Appointments);
MapiCalendar mapiCal = (MapiCalendar)calMapiMsg.toMapiMessageItem();
calFolder.addMapiMessageItem(mapiCal);
The ICS file is;
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//ACME Software//NONSGML Notes Release 9.0.1FP1//EN
BEGIN:VEVENT
CLASS:PUBLIC
TRANSP:OPAQUE
DTSTART:20140729T220000Z
DTEND:20140729T230000Z
DTSTAMP:20140723T004138Z
LAST-MODIFIED:20140824T013130Z
UID:87ADB15FB0731E4DCC257D1E0003D023
SEQUENCE:0
ORGANIZER;CN="John Lowndes":mailto:John_Lowndes@acme.co.nz
ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CN="John Lowndes";RSVP=FALSE
:mailto:John_Lowndes@acme.co.nz
SUMMARY:Test Meeting UTC
DESCRIPTION:This is the description
END:VEVENT
END:VCALENDAR
If I import this ics file into Outlook using the code above, the meeting date/time is not translated from UTC to the local timezone, and it appears in the calendar as 29 July 2014 22:00.
If I import this ics file directly using Outlook, the meeting date/time is translated from UTC to the local timezone, and it appears in the calendar as the correct time 30 July 2014 10:00.
This has been tested on Windows 8.1 & Windows 7, Timezone (UTC+12:00) Coordinated Universal Time+12
Can you please advise what is wrong with the code, or why it does not acknowledge the UTC timezone values?
Thanks
Evaluating Aspose.Email for Java 4.3.0, I try to load an ICS file which specifies UTC time into a PST, using the code below;
String pathPSTFileStr = "c:\\temp\\testPST.pst";
String testFile = "c:\\temp\\test.ics";
PersonalStorage pst = PersonalStorage.create(pathPSTFileStr, 0);
Appointment calDoc = Appointment.load(testFile);
MailMessage calMsg = new MailMessage();
calMsg.addAlternateView(calDoc.requestApointment());
MapiMessage calMapiMsg = MapiMessage.fromMailMessage(calMsg);
FolderInfo calFolder = pst.createPredefinedFolder("Calendar", StandardIpmFolder.Appointments);
MapiCalendar mapiCal = (MapiCalendar)calMapiMsg.toMapiMessageItem();
calFolder.addMapiMessageItem(mapiCal);
The ICS file is;
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//ACME Software//NONSGML Notes Release 9.0.1FP1//EN
BEGIN:VEVENT
CLASS:PUBLIC
TRANSP:OPAQUE
DTSTART:20140729T220000Z
DTEND:20140729T230000Z
DTSTAMP:20140723T004138Z
LAST-MODIFIED:20140824T013130Z
UID:87ADB15FB0731E4DCC257D1E0003D023
SEQUENCE:0
ORGANIZER;CN="John Lowndes":mailto:John_Lowndes@acme.co.nz
ATTENDEE;ROLE=CHAIR;PARTSTAT=ACCEPTED;CN="John Lowndes";RSVP=FALSE
:mailto:John_Lowndes@acme.co.nz
SUMMARY:Test Meeting UTC
DESCRIPTION:This is the description
END:VEVENT
END:VCALENDAR
If I import this ics file into Outlook using the code above, the meeting date/time is not translated from UTC to the local timezone, and it appears in the calendar as 29 July 2014 22:00.
If I import this ics file directly using Outlook, the meeting date/time is translated from UTC to the local timezone, and it appears in the calendar as the correct time 30 July 2014 10:00.
This has been tested on Windows 8.1 & Windows 7, Timezone (UTC+12:00) Coordinated Universal Time+12
Can you please advise what is wrong with the code, or why it does not acknowledge the UTC timezone values?
Thanks