About rebasing calendars programmatically for Daylight Saving Time

Many countries observe daylight saving time (DST) by advancing clocks so that evenings have longer daylight. This is typically done by setting the clock an hour ahead in the spring, and setting the clock an hour back in the fall. In this topic, this period between the spring and fall is referred to as the DST period. Most countries have their own regulations for when DST starts and ends. The dates of the DST period can change from year to year, and users must update their Microsoft Outlook calendar every time that the DST regulations change.

If you use a version of Windows that is Windows Vista or later, or have Windows automatic update turned on, you may not be affected by the change in DST. Otherwise, you should install DST updates for Windows. Regardless of whether the updates are installed automatically, on your behalf by an IT department, or by yourself as a home user, some existing appointments that occur during the DST period might display incorrect times after the DST updates for Windows are installed. This is true for both recurring and single-instance appointments. You must update these appointments to display them correctly in Outlook, in Outlook Web App, and in applications that are based on Collaboration Data Objects (CDO). Updating incorrectly displayed appointments on calendars because of DST is known as rebasing calendars.

Outlook provides tools for users and Exchange Server provides tools for administrators to rebase calendars. Outlook provides the Time Zone Data Update Tool for Outlook users. With this tool, users can update their own calendars. Exchange Server provides the Exchange Calendar Update Tool that helps administrators to avoid difficulties that result from deploying the Outlook tool widely to all users and to make sure that each user runs the Outlook tool correctly.

In addition to relying on users to run the Time Zone Data Update Tool or administrators to run the Exchange Calendar Update Tool, third-party MAPI client software developers can download a DLL, Tzmovelib.dll. By using this assembly, developers can use the same APIs that Outlook and Exchange Server use in their calendar rebasing tools.

The following list shows the calendar rebasing APIs:

To write an appointment rebasing tool by using the calendar rebasing APIs, you can use the following procedure:

  1. Use IOlkApptRebaser::BeginEnumerateAppointments and IOlkApptRebaser::EndEnumerateAppointments to find appointments that are candidates for rebasing. If necessary, present information to enable the user to decide which appointments to rebase. Alternatively, use MAPI or the Outlook Object Model to examine the time and recurrence information for an appointment by parsing the PidLidAppointmentTimeZoneDefinitionStartDisplay, PidLidAppointmentTimeZoneDefinitionEndDisplay, and PidLidAppointmentTimeZoneDefinitionRecur properties.

  2. Use HrCreateApptRebaser, IOlkApptRebaser::BeginRebaseAppointments, and IOlkApptRebaser::EndRebaseAppointments to rebase the appointment.

See also