Version

UtcOffset Property

The UTC offset of when the Recurrence was created or last modified.
Syntax
'Declaration
 
Public Property UtcOffset As TimeSpan
public TimeSpan UtcOffset {get; set;}
Remarks

This represents the time span between UTC and the time zone of the user responsible for creating or last updating this Recurrence object. The DayOfMonth property and others are sensitive to any time zone difference between the user who has set these property values and other users viewing the occurrences which result. The UtcOffset property can be used to clarify the intended meaning of these recurrence pattern properties.

For example, suppose a user in New York City (Eastern Standard Time, -5 hours from the Greenwich Meridian) creates a recurring activity scheduled for the last day of every month, starting on the last day of April at 10:00 PM local time. The root activity will be saved to the database with a UTC start date/time of 3:00 AM on the first day of May. The problem comes when a user in Frankfurt, Germany (Central European Time, +1 hour from the Greenwich Meridian) opens the schedule for this resource. For them, this "last day of every month" recurring activity would not take effect until 4:00 AM on the last day of May, because calendar month on the start date/time UTC is May and not April. What the user in Frankfurt should see is an occurrence at 4:00 AM local time on the first day of every month.

When the UtcOffset property on the Recurrence is properly set to a TimeSpan with a value of -5 hours to reflect the original user's intent that the recurrence pattern apply to the last day of month from the perspective of Eastern Standard Time, WebSchedule's recurrence engine makes the appropriate adjustment and produces an occurrence starting on the last day of April.

Failure to set the UtcOffset property may cause a global WebSchedule application to seemingly miss the first occurrence of a recurring series, and add an extra occurrence to the end of a recurring series, depending on the time zone of the end user. The WebSchedule user interface manages this for you, however when you create your own Recurrence objects programmatically, you must set the correct value on the UtcOffset property to match the current timezone UTC offset in which you want the recurrence created.

While the recurrence engine generates occurrences by accounting for the UtcOffset, the user interface will display the original property values on the Recurrence object. These may not match the expectations of users looking at the recurrence pattern from a different time zone. Using the above example, our user in Frankfurt would still see the Recurrence pattern as being a "last day of month" pattern, even though from their perspective the occurrences are always on the first day of the month.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also