TimeZoneInfo.TransitionTime Structure
TOC
Collapse the table of content
Expand the table of content

TimeZoneInfo.TransitionTime Structure

.NET Framework (current version)
 

Provides information about a specific time change, such as the change from daylight saving time to standard time or vice versa, in a particular time zone.

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

[SerializableAttribute]
[HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
public struct TransitionTime : IEquatable<TimeZoneInfo.TransitionTime>, 
	ISerializable, IDeserializationCallback

NameDescription
System_CAPS_pubpropertyDay

Gets the day on which the time change occurs.

System_CAPS_pubpropertyDayOfWeek

Gets the day of the week on which the time change occurs.

System_CAPS_pubpropertyIsFixedDateRule

Gets a value indicating whether the time change occurs at a fixed date and time (such as November 1) or a floating date and time (such as the last Sunday of October).

System_CAPS_pubpropertyMonth

Gets the month in which the time change occurs.

System_CAPS_pubpropertyTimeOfDay

Gets the hour, minute, and second at which the time change occurs.

System_CAPS_pubpropertyWeek

Gets the week of the month in which a time change occurs.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticCreateFixedDateRule(DateTime, Int32, Int32)

Defines a time change that uses a fixed-date rule (that is, a time change that occurs on a specific day of a specific month).

System_CAPS_pubmethodSystem_CAPS_staticCreateFloatingDateRule(DateTime, Int32, Int32, DayOfWeek)

Defines a time change that uses a floating-date rule (that is, a time change that occurs on a specific day of a specific week of a specific month).

System_CAPS_pubmethodEquals(Object)

Determines whether an object has identical values to the current TimeZoneInfo.TransitionTime object.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodEquals(TimeZoneInfo.TransitionTime)

Determines whether the current TimeZoneInfo.TransitionTime object has identical values to a second TimeZoneInfo.TransitionTime object.

System_CAPS_pubmethodGetHashCode()

Serves as a hash function for hashing algorithms and data structures such as hash tables.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns the fully qualified type name of this instance.(Inherited from ValueType.)

NameDescription
System_CAPS_puboperatorSystem_CAPS_staticEquality(TimeZoneInfo.TransitionTime, TimeZoneInfo.TransitionTime)

Determines whether two specified TimeZoneInfo.TransitionTime objects are equal.

System_CAPS_puboperatorSystem_CAPS_staticInequality(TimeZoneInfo.TransitionTime, TimeZoneInfo.TransitionTime)

Determines whether two specified TimeZoneInfo.TransitionTime objects are not equal.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIDeserializationCallback.OnDeserialization(Object)

This API supports the product infrastructure and is not intended to be used directly from your code. Runs when the deserialization of an object has been completed.

System_CAPS_pubinterfaceSystem_CAPS_privmethodISerializable.GetObjectData(SerializationInfo, StreamingContext)

This API supports the product infrastructure and is not intended to be used directly from your code. Populates a SerializationInfo object with the data that is required to serialize this object.

You can use the TimeZoneInfo.TransitionTime structure to indicate when a transition from standard time to daylight saving time, or from daylight saving time back to standard time, occurs. This structure supports both fixed-date rules and floating-date rules. Use fixed-date rules for time transitions that occur on a specific day of a specific month (such as 2:00 A.M. on November 3). Use floating-date rules for time transitions that occur on a specific day of a specific week of a specific month (such as 2:00 A.M. on the first Sunday of November).

The following table compares the properties used in fixed-date and floating-date transitions:

Month

Week

Day

Time

Fixed-date rule

Month

N/A

Day

TimeOfDay

Floating-date rule

Month

Week

DayOfWeek

TimeOfDay

For both fixed-date and floating-date transitions, the TimeOfDay property gets the time at which the time change occurs. For transitions from standard to daylight saving time, this is the time zone's standard time value. For transitions from daylight saving to standard time, this is the time zone's daylight saving time value. This is a DateTime value whose date component is ignored; its year, month, and day value must always equal 1.

System_CAPS_noteNote

An instance of the TimeZoneInfo.TransitionTime structure is immutable. Once an object has been created, its values cannot be modified.

A TimeZoneInfo.TransitionTime object can be created by calling the static (Shared in Visual Basic) CreateFixedDateRule and CreateFloatingDateRule methods to create a fixed or floating-date rule, respectively. The starting and ending TimeZoneInfo.TransitionTime objects are then supplied as parameters to the CreateAdjustmentRule method to create a new adjustment rule that includes this transition time information.

The DaylightTransitionStart and DaylightTransitionEnd properties of an TimeZoneInfo.AdjustmentRule object return a TimeZoneInfo.TransitionTime object.

.NET Framework
Available since 3.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft