Time Zones

  • 4 minutes to read
NOTE

You are viewing documentation for the legacy WPF Scheduler control. If you're starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.

This document describes the time zone support implemented in the Scheduler. It explains how the Scheduler calculates appointment start and end values for display and indicates the difference between the regular and "floating" appointments.

Time Zone Information

Time zone information is used to calculate start and end times for an appointment. The Scheduler uses the standard TimeZoneInfo objects of the .NET Framework to specify its time zone information.

The SchedulerStorageBase.TimeZoneId property specifies the time zone of the appointment start and end values contained in the appointment storage (operational time zone). By default, it is the same as the time zone of the host system. The Scheduler displays an appointment using the start and end values converted to the time zone specified by the SchedulerOptionsBehaviorBase.ClientTimeZoneId setting. By default, it is the same as the operational time zone of the SchedulerStorage.

When the scheduler is bound to a data source, the SchedulerStorage retrieves and stores DateTime data without conversion. So, if the database contains DateTime data in UTC, the host operates at Pacific Time and the client application is located in Eastern Time, you should set the SchedulerStorageBase.TimeZoneId property to "UTC" and the SchedulerOptionsBehaviorBase.ClientTimeZoneId should be set to the "Eastern Standard Time" or, more correctly, to the System.TimeZoneInfo.Local.Id value obtained at the client host.

NOTE

DST (daylight saving time) rules may be different for different years at the same time zone.

Time Ruler

You can display multiple Time Rulers to show time in different time zones. The Time Ruler exposes two properties for the time zone support. Use the TimeRuler.TimeZoneId property to specify the time zone for which time is displayed. The TimeRuler.UseClientTimeZone property specifies that the time zone of the Time ruler follows the time zone of the Scheduler.

TimeZoneWPF

Reminders

Reminder alert times are not translated when reminders are loaded into the SchedulerStorage from the data source. The reminder alerts are triggered by the SchedulerStorage using the SchedulerStorage time zone.

Daylight Saving Time

Appointment start and end time are automatically adjusted if Daylight Saving Time (DST) is in effect. If the appointment interval spans DST change, its visual appearance is based on UTC since Scheduler views do not allow discontinuous time scales. However, start and end time values are calculated considering DST rules.

Floating Appointments

The Scheduler supports the "floating" time zone for all-day appointments. "Floating" means that the time is independent of the client time zone. A typical example of a "floating" all-day appointment would be New Year's Day. It starts at midnight on January 1st in any time zone. Therefore, it does not start simultaneously throughout the world - it starts at different times, according to the time zone where the client is located.

All-day appointments (appointments with the Appointment.AllDay property set to true) are always treated as if they belong to a "floating" time zone.

However, to perform a centralized action (for example, to restart a server at a pilot factory, resulting in a break in connectivity between departments), the appointment should occur only once, at a different time in each applicable time zone. In this case, a regular appointment is used, not a “floating” appointment.

NOTE

When you programmatically assign Appointment.Start and Appointment.End times to an appointment, do not create the DateTime object via the constructor that specifies the System.DateTimeKind enumeration value. Although it helps to indicate whether the DateTime object specifies a local time or UTC in .NET, the Scheduler does not support this flag, and interprets the time incorrectly.