TimeZoneInfo::TransitionTime::CreateFixedDateRule Method
Defines a time change that uses a fixed-date rule.
Assembly: mscorlib (in mscorlib.dll)
public: static TimeZoneInfo..::..TransitionTime CreateFixedDateRule( DateTime timeOfDay, int month, int day )
Parameters
- timeOfDay
- Type: System::DateTime
The time at which the time change occurs.
- month
- Type: System::Int32
The month in which the time change occurs.
- day
- Type: System::Int32
The day of the month on which the time change occurs.
| Exception | Condition |
|---|---|
| ArgumentException | The timeOfDay parameter has a non-default date component. -or- The timeOfDay parameter's Kind property is not DateTimeKind::Unspecified. -or- The timeOfDay parameter does not represent a whole number of milliseconds. |
| ArgumentOutOfRangeException | The month parameter is less than 1 or greater than 12. -or- The day parameter is less than 1 or greater than 31. |
This method creates a fixed-date rule (that is, a time change that occurs on a specific day of a specific month). For example, a time change that always occurs on October 28 follows a fixed-date rule.
The following table indicates how the parameters of the CreateFixedDateRule method correspond to the properties of the TimeZoneInfo::TransitionTime object.
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.