SchedulerTimeZone
Associates a TimeZoneInfo with a label and calculates wall-clock offsets between time zones. Day-oriented Scheduler views use these wrappers for selectable and per-zone ruler configurations.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public class SchedulerTimeZone : INotifyPropertyChanged
Inheritance: objectSchedulerTimeZone
Implements:
Constructors
Creates a new SchedulerTimeZone.
public SchedulerTimeZone(int bias, string label)
The UTC-offset bias in minutes, using the opposite sign of the zone's UTC offset.
labelstringA name used to prefer a matching installed time zone when several have the requested offset.
Exceptions: ArgumentExceptionNo installed time zone has an offset matching bias.
Wraps a time-zone definition and initializes Label from its display name.
public SchedulerTimeZone(TimeZoneInfo timeZone)
The time-zone definition to wrap. If null, TimeZoneInformation remains null.
Properties
Gets or sets the label associated with this time zone. Changing the label raises PropertyChanged but does not change the wrapped time-zone definition.
public string Label { get; set; }
Gets the wrapped time-zone definition, or null when the instance was constructed with a null value.
public TimeZoneInfo TimeZoneInformation { get; }
Methods
Returns the hash code of the wrapped time-zone definition.
Creates a list of wrappers for the system time zones returned by GetSystemTimeZones().
public static List<SchedulerTimeZone> GetSchedulerTimeZones()
List<SchedulerTimeZone>
A new list containing one SchedulerTimeZone for each system time zone.
Finds a system time zone with the requested offset, preferring one whose name or ID matches label.
Offset matching uses each zone's UTC offset for Today; if no label matches, the last matching item returned by GetSystemTimeZones() is used.
public static TimeZoneInfo GetSpecificTimeZone(int bias, string label)
The UTC-offset bias in minutes, using the opposite sign of the zone's UTC offset.
labelstringA display, daylight, standard, or ID string used to select among zones with the same offset.
Returns:A matching system time zone, or null if no zone has the requested offset today.
Finds the last item returned by GetSystemTimeZones() whose UTC offset today equals the negation of bias.
public static TimeZoneInfo GetSpecificTimeZone(int bias)
The UTC-offset bias in minutes, using the opposite sign of the zone's UTC offset.
Returns:The matching system time zone, or null if no zone has that offset today.
Adjusts a wall-clock time by the difference between this zone's UTC offset and the base zone's offset at that time.
public virtual DateTime OffsetTime(DateTime dateTime, SchedulerTimeZone baseTimeZone)
The wall-clock time whose offset is being adjusted.
baseTimeZoneSchedulerTimeZoneThe time zone whose offset is subtracted from this zone's offset.
Returns:dateTime shifted by the difference in UTC offsets.
Raises PropertyChanged for the specified property.
protected virtual void OnPropertyChanged(string propertyName)
The name of the changed property.
Events
Occurs when the Label property changes.
public event PropertyChangedEventHandler PropertyChanged
Implements: