none
Best practice creating calendar items across timezones RRS feed

  • Question

  • Hi, 

    I have the need for my application to be accurate across timezone when creating calendar entries.  I need some best practices and advice for achieving this.

    1. How can i ensure that when a user requests free/busy data that the data returned reflects their timezone?

    2. When a user creates a calendar item based on free/busy data how can i ensure that the calendar entry created reflects their current timezone?

    Apologies if these are pretty basic questions however i have had some difficulty with my current implementation;

    My approach: 

    I manually configure the standard and daylight savings time in a config file and use when constructing my SOAP request for free/busy data. I have been using this approach because my development environment is WIndows 7 however the deployed environment is Linux so the process of getting the timezone is not consistent.

    Because I'm based in GMT time the free/busy requests made by my colleagues in the US (EST timezone) is inconsistent.

    Looking forward to any suggestions or direction on this.

     

     

     

    Tuesday, January 31, 2012 7:31 PM

Answers

  • Outlook 2007 and up should automatically handle the timezone conversion correctly as long as you set standard time zone name when syncing to calendar. So you need to know what timezone user's calendar is set to. So allow each user to select their timezone in your app that matches with the timezone set in their calendar.

    • Marked as answer by colinduggan Monday, February 6, 2012 11:57 AM
    Wednesday, February 1, 2012 12:46 PM
  • I am not sure how setting LegacyFreeBusyStatus is related to time zone but here is how i'd create an appointment in calendar. The BaseOffset is optional. You don't need to set it if you already set TimeZoneName

    calendarItem.LegacyFreeBusyStatus = LegacyFreeBusyType.Free;

    calendarItem.LegacyFreeBusyStatusSpecified = true;           

    calendarItem.MeetingTimeZone = new TimeZoneType();

    calendarItem.MeetingTimeZone.TimeZoneName = standardTimeZoneName; // for example: "Eastern Standard Time"

    • Marked as answer by colinduggan Monday, February 6, 2012 11:56 AM
    Friday, February 3, 2012 3:21 PM

All replies

  • Outlook 2007 and up should automatically handle the timezone conversion correctly as long as you set standard time zone name when syncing to calendar. So you need to know what timezone user's calendar is set to. So allow each user to select their timezone in your app that matches with the timezone set in their calendar.

    • Marked as answer by colinduggan Monday, February 6, 2012 11:57 AM
    Wednesday, February 1, 2012 12:46 PM
  • Great, and when requesting free/busy data can i leave out the Standard and Daylight savings configuration and instead use a timezone string?

     

    Thursday, February 2, 2012 1:54 PM
  • I am not sure about your question. Are you talking about this property?

    CalendarItemType.LegacyFreeBusyStatus??

    Friday, February 3, 2012 1:27 PM
  • Yes.
    It is the resources availability as seen in the calendar view in Outlook. I want to be able request this information based on the users timezone and then allow them to book the resource again using their timezone.
    I can handle the booking part by using the MeetingTimeZone element. In the browser i can check the time zone and then calculate the BaseOffset. The problem is with getting GetUserAvailability request. Maybe i can use the MeetingTimeZone element instead of using the daylight and standard time details?
    -
    -
    <CalendarItem xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
    <Subject>Test subject</Subject>
    <Body BodyType="Text">Test body</Body>
    <ReminderIsSet>true</ReminderIsSet>
    <ReminderMinutesBeforeStart>15</ReminderMinutesBeforeStart>
    <Start>2012-02-03T17:30:00</Start><End>2012-02-03T18:00:00</End><IsAllDayEvent>false</IsAllDayEvent>
    <LegacyFreeBusyStatus>Busy</LegacyFreeBusyStatus>
    <Location>xyz</Location><RequiredAttendees><Attendee>
    <Mailbox><EmailAddress>a@email.com</EmailAddress>
    </Mailbox></Attendee></RequiredAttendees>
    <Resources>
    <Attendee>
    <Mailbox>
    <EmailAddress>xyz@email.com</EmailAddress>
    </Mailbox></Attendee></Resources><MeetingTimeZone>
    <BaseOffset>P0Y0M0DT5H0M0S</BaseOffset></MeetingTimeZone>
    </CalendarItem>
    




    • Edited by colinduggan Friday, February 3, 2012 2:50 PM
    Friday, February 3, 2012 2:50 PM
  • I am not sure how setting LegacyFreeBusyStatus is related to time zone but here is how i'd create an appointment in calendar. The BaseOffset is optional. You don't need to set it if you already set TimeZoneName

    calendarItem.LegacyFreeBusyStatus = LegacyFreeBusyType.Free;

    calendarItem.LegacyFreeBusyStatusSpecified = true;           

    calendarItem.MeetingTimeZone = new TimeZoneType();

    calendarItem.MeetingTimeZone.TimeZoneName = standardTimeZoneName; // for example: "Eastern Standard Time"

    • Marked as answer by colinduggan Monday, February 6, 2012 11:56 AM
    Friday, February 3, 2012 3:21 PM