Free Support Forum - aspose.com

Appointment in PST no displays timezone when open through Outlook, but uses setted timezone


#1
BEGIN:VCALENDAR
METHOD:PUBLISH
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
X-WR-CALNAME:Test
BEGIN:VTIMEZONE
TZID:America/New_York
BEGIN:STANDARD
DTSTART:16010101T020000
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=11;BYDAY=1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
SUMMARY;LANGUAGE=en-US:Test
DTSTART;TZID=America/New_York:20180416T080000
DTEND;TZID=America/New_York:20180416T110000
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20190213T131720Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:0
END:VEVENT
END:VCALENDAR

calendar.png (1.7 KB)


#2

@Ruzal,

I have observed the information shared by you and request you to please try using latest Aspose.Email 19.1 on your end. In case there is still an issue then please provide the sample code used along with source and generated output so that we may log the issue in our issue tracking system after reproducing it.


#4
		PersonalStorage pst = PersonalStorage.create("test.pst", FileFormatVersion.Unicode);
		FolderInfo calendar = pst.createPredefinedFolder("Test", StandardIpmFolder.Appointments);
		java.util.Calendar startDate = java.util.Calendar.getInstance();
		startDate.set(2019, 2, 25);
		startDate.set(Calendar.HOUR, 6);
		startDate.set(Calendar.MINUTE, 0);
		java.util.Calendar endDate = java.util.Calendar.getInstance();
		endDate.set(2019, 2, 26);
		startDate.set(Calendar.HOUR, 11);
		startDate.set(Calendar.MINUTE, 0);

		MailAddressCollection attendees = new MailAddressCollection();
		attendees.addMailAddress(new MailAddress("attendee@domain.com", "Attendee"));
		Appointment app = new Appointment("location", startDate.getTime(), endDate.getTime(),
			new MailAddress("organizer@domain.com", "Organizer"), attendees);
		app.setTimeZone("America/New_York");
		MailMessage msg = new MailMessage();
		msg.addAlternateView(app.requestApointment());
		MapiMessage mapi = MapiMessage.fromMailMessage(msg);
		calendar.addMapiMessageItem(mapi);
		pst.dispose();

#5

@Ruzal,

For time zone related information, I suggest you to please visit this documentation link for your convenience.


#6

Thanks, but what is wrong in my example code?


#7

@Ruzal,

As shared in the documentation link, you need to set the MapiCalendarTimeZone.


#8

why will not work app.setTimeZone(“America/New_York”); ? How I can load apointment with correctly timezone view in outlook from meta content in the top inital question?


#9

@Ruzal,

Can you please share if the suggested code worked on your end or not. If there is still issue incurring on your end then please provide the source fil and working sample code along with generated output. We will investigate that on our end that why your option is not been able to set time zone accordingly.