none
exchange 2016 calander item's timezone is null RRS feed

  • Question

  •            
     conference.Timezone = TimeZoneMapper.GetOlsonTimeZone(calendarItemType.TimeZone);

    FYI - calendarItemType is an Appointment type from the Exchange managed api

    We have had the above line of code for years, recently we were testing on exchange 2016 and now TimeZone is null (FYI calendarItemType is populated), causing an error.

    Is this maybe a configuration issue, or did something change in the new exchange regarding this field?

    How can i get the timezone for an Appointment object (if not a configuration issue)?




    • Edited by owen gerig Wednesday, June 22, 2016 2:47 PM
    Wednesday, June 22, 2016 2:40 PM

Answers

  • The TimeZone property was Legacy in Exchange 2007 and from Exchange 2010 you should be using the Start and EndTimezone properties https://msdn.microsoft.com/en-us/library/office/dn789029(v=exchg.150).aspx . It still should be returned which is what I see on 2016 (with the latest cu's applied) but it maybe because your not setting it correctly (eg your not setting the Start and EndTime Zone Props if you creating appointments programmatically). I would suggest taking a look at one of the appointment with a Mapi Editor like Outlook Spy of MFCMapi and also try dumping out the how SOAP response and looking at all the properties that are being returned.

    Cheers
    Glen

     
    • Marked as answer by owen gerig Monday, June 27, 2016 6:18 PM
    Thursday, June 23, 2016 4:30 AM

All replies

  • The TimeZone property was Legacy in Exchange 2007 and from Exchange 2010 you should be using the Start and EndTimezone properties https://msdn.microsoft.com/en-us/library/office/dn789029(v=exchg.150).aspx . It still should be returned which is what I see on 2016 (with the latest cu's applied) but it maybe because your not setting it correctly (eg your not setting the Start and EndTime Zone Props if you creating appointments programmatically). I would suggest taking a look at one of the appointment with a Mapi Editor like Outlook Spy of MFCMapi and also try dumping out the how SOAP response and looking at all the properties that are being returned.

    Cheers
    Glen

     
    • Marked as answer by owen gerig Monday, June 27, 2016 6:18 PM
    Thursday, June 23, 2016 4:30 AM
  • thank you. using StartTimeZone was the fix

    had to add it to the requested properties as well though

    ExtendedPropertyDefinition prop = new ExtendedPropertyDefinition(DefaultExtendedPropertySet.Appointment, 0x8238, MapiPropertyType.String);
                PropertySet psPropset = new PropertySet(BasePropertySet.FirstClassProperties) { AppointmentSchema.Subject, AppointmentSchema.Body, AppointmentSchema.TimeZone, AppointmentSchema.StartTimeZone, prop };
                

    Monday, June 27, 2016 6:18 PM