New to Telerik UI for WinForms? Start a free 30-day trial

Defines the date range and transition rules for a daylight-saving adjustment.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

C#
public sealed class TimeZoneInfo.AdjustmentRule : IEquatable<TimeZoneInfo.AdjustmentRule>, ISerializable, IDeserializationCallback

Inheritance: objectTimeZoneInfo.AdjustmentRule

Implements: IDeserializationCallbackIEquatable<TimeZoneInfo.AdjustmentRule>ISerializable

Properties

Gets the inclusive last date on which this rule applies.

C#
public DateTime DateEnd { get; }

Gets the inclusive first date on which this rule applies.

C#
public DateTime DateStart { get; }

Gets the offset added to the base UTC offset while daylight time is in effect; the delta can be negative.

C#
public TimeSpan DaylightDelta { get; }

Gets the annual transition back to standard time.

C#
public TimeZoneInfo.TransitionTime DaylightTransitionEnd { get; }

Gets the annual transition into daylight time.

C#
public TimeZoneInfo.TransitionTime DaylightTransitionStart { get; }

Methods

Creates a rule that applies a daylight offset between the specified annual transitions and date bounds.

C#
public static TimeZoneInfo.AdjustmentRule CreateAdjustmentRule(DateTime dateStart, DateTime dateEnd, TimeSpan daylightDelta, TimeZoneInfo.TransitionTime daylightTransitionStart, TimeZoneInfo.TransitionTime daylightTransitionEnd)
Parameters:dateStartDateTime

The first date on which the rule applies; it must have an unspecified kind and midnight time.

dateEndDateTime

The last date on which the rule applies; it must have an unspecified kind and midnight time.

daylightDeltaTimeSpan

The offset added to the base UTC offset during daylight time, in whole minutes.

daylightTransitionStartTimeZoneInfo.TransitionTime

The transition into daylight time.

daylightTransitionEndTimeZoneInfo.TransitionTime

The transition back to standard time.

Returns:

TimeZoneInfo.AdjustmentRule

The adjustment rule for the supplied dates and transitions.

Exceptions: ArgumentException

The date bounds are invalid, the transitions are identical, or the offset contains seconds.

ArgumentOutOfRangeException

daylightDelta is outside the supported UTC-offset range.

Determines whether another rule has the same date range, daylight delta, and transition rules.

C#
public bool Equals(TimeZoneInfo.AdjustmentRule other)
Parameters:otherTimeZoneInfo.AdjustmentRule

The rule to compare with this instance.

Returns:

bool

true if all rule values match; otherwise, false.

Implements: IEquatable<TimeZoneInfo.AdjustmentRule>.Equals(TimeZoneInfo.AdjustmentRule)

Returns a hash code derived from the rule's start date.

C#
public override int GetHashCode()
Returns:

int

Overrides: object.GetHashCode()