Nevron Open Vision Documentation
Nevron.Nov Namespace / NAdjustmentRule Class / CreateAdjustmentRule Method
The effective date of the adjustment rule. If the value of the dateStart parameter is DateTime.MinValue.Date, this is the first adjustment rule in effect for a time zone.
The last date that the adjustment rule is in force. If the value of the dateEnd parameter is DateTime.MaxValue.Date, the adjustment rule has no end date.
The time change that results from the adjustment. This value is added to the time zone's NTimeZoneInfo.BaseUtcOffset property to obtain the correct daylight offset from Coordinated Universal Time (UTC). This value can range from -14 to 14.
A NTimeZoneInfo.TransitionTime object that defines the start of daylight saving time.
A NTimeZoneInfo.TransitionTime object that defines the end of daylight saving time.


In This Topic
    CreateAdjustmentRule Method
    In This Topic
    Creates a new adjustment rule for a particular time zone.
    Syntax
    'Declaration
     
    
    Public Shared Function CreateAdjustmentRule( _
       ByVal dateStart As System.Date, _
       ByVal dateEnd As System.Date, _
       ByVal daylightDelta As System.TimeSpan, _
       ByVal daylightTransitionStart As NTransitionTime, _
       ByVal daylightTransitionEnd As NTransitionTime _
    ) As NAdjustmentRule
    'Usage
     
    
    Dim dateStart As System.Date
    Dim dateEnd As System.Date
    Dim daylightDelta As System.TimeSpan
    Dim daylightTransitionStart As NTransitionTime
    Dim daylightTransitionEnd As NTransitionTime
    Dim value As NAdjustmentRule
     
    value = NAdjustmentRule.CreateAdjustmentRule(dateStart, dateEnd, daylightDelta, daylightTransitionStart, daylightTransitionEnd)
    public static NAdjustmentRule CreateAdjustmentRule( 
       System.DateTime dateStart,
       System.DateTime dateEnd,
       System.TimeSpan daylightDelta,
       NTransitionTime daylightTransitionStart,
       NTransitionTime daylightTransitionEnd
    )

    Parameters

    dateStart
    The effective date of the adjustment rule. If the value of the dateStart parameter is DateTime.MinValue.Date, this is the first adjustment rule in effect for a time zone.
    dateEnd
    The last date that the adjustment rule is in force. If the value of the dateEnd parameter is DateTime.MaxValue.Date, the adjustment rule has no end date.
    daylightDelta
    The time change that results from the adjustment. This value is added to the time zone's NTimeZoneInfo.BaseUtcOffset property to obtain the correct daylight offset from Coordinated Universal Time (UTC). This value can range from -14 to 14.
    daylightTransitionStart
    A NTimeZoneInfo.TransitionTime object that defines the start of daylight saving time.
    daylightTransitionEnd
    A NTimeZoneInfo.TransitionTime object that defines the end of daylight saving time.

    Return Value

    A NTimeZoneInfo.AdjustmentRule object that represents the new adjustment rule.
    Exceptions
    ExceptionDescription
    The System.DateTime.Kind property of the dateStart or dateEnd parameter does not equal System.DateTimeKind.Unspecified.-or-The daylightTransitionStart parameter is equal to the daylightTransitionEnd parameter.-or-The dateStart or dateEnd parameter includes a time of day value.
    dateEnd is earlier than dateStart.-or-daylightDelta is less than -14 or greater than 14.-or-The System.TimeSpan.Milliseconds property of the daylightDelta parameter is not equal to 0.-or-The System.TimeSpan.Ticks property of the daylightDelta parameter does not equal a whole number of seconds.
    Requirements

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

    See Also