Export (0) Print
Expand All

TimeZoneInfo.AdjustmentRule.DateEnd Property

Gets the date when the adjustment rule ceases to be in effect.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public DateTime DateEnd { get; }

Property Value

Type: System.DateTime
A DateTime value that indicates the end date of the adjustment rule.

The value of the DateEnd property is a date value without a time component.

Because the end date of the current adjustment rule is typically not known, you can assign DateTime.MaxValue.Date to the DateEnd property when you create a custom adjustment rule.

Important noteImportant

   Unless there is a compelling reason to do otherwise, you should define the adjustment rule's end date to occur within the time interval during which the time zone observes standard time. Unless there is a compelling reason to do so, you should not define the adjustment rule's end date to occur within the time interval during which the time zone observes daylight saving time. For example, if a time zone's transition from daylight saving time occurs on the third Sunday of March and its transition to daylight saving time occurs on the first Sunday of October, the effective end date of the adjustment rule should not be December 31 of a particular year, since that date occurs within the period of daylight saving time.

By default, the registry in Windows XP defines a single adjustment rule whose end date is Friday, December 31, 9999 (the value of DateTime.MaxValue.Date), for each time zone. For time zones in the United States, the registry in Windows Vista defines two adjustment rules:

  • Monday, January 01, 0001, to Sunday, December 31, 2006.

  • Monday, January 01, 2007, to Friday, December 31, 9999.

This means that, although time zone adjustment rules stored in the registry are useful for performing current time zone-related operations, they cannot be reliably used for retrieving historical time zone information. For information about defining a custom time zone with multiple adjustment rules that can be used in a historical time zone-aware application, see How to: Create Time Zones with Adjustment Rules.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft