TimeZoneInfo::GetAdjustmentRules Method
Retrieves an array of TimeZoneInfo::AdjustmentRule objects that apply to the current TimeZoneInfo object.
Assembly: mscorlib (in mscorlib.dll)
Return Value
Type: array<System::TimeZoneInfo::AdjustmentRule>An array of objects for this time zone.
| Exception | Condition |
|---|---|
| OutOfMemoryException | The system does not have enough memory to make an in-memory copy of the adjustment rules. |
The GetAdjustmentRules method retrieves an array of System::TimeZoneInfo::AdjustmentRule objects. Each object in the array defines the effective start and end date of that time zone adjustment, as well as its delta (the exact amount by which the adjustment causes the time to change). In addition, two properties return System::TimeZoneInfo::TransitionTime objects that define when each annual transition to and from standard time occurs.
If a time zone has no adjustment rules, the GetAdjustmentRules method returns an empty array (an array whose Length is zero).
Any modifications to the elements of the array returned by the GetAdjustmentRules method are not reflected in the adjustment rules that belong to a particular time zone. To modify a time zone's adjustment rules (such as to reflect its historical transition to and from daylight saving time) you must create a new time zone with the appropriate adjustment rules, rather than modify the existing one.
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
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.