System.Globalization.DaylightTime Class

Assembly: Mscorlib.dll
Namespace: System.Globalization
Summary
Defines the period of daylight-saving time.
C# Syntax:
[Serializable]
public class DaylightTime
Remarks
Daylight-saving time is a period during the year when the time is advanced, usually by an hour, to take advantage of the extended daylight hours. At the end of the period, the time is set back to the standard time.
See also:
System.Globalization Namespace | DateTime | TimeSpan

System.Globalization.DaylightTime Member List:

Public Constructors
ctor #1 Initializes a new instance of the DaylightTime class.
Public Properties
Delta Read-only

Gets the TimeSpan that represents the difference between the standard time and the daylight-saving time.
End Read-only

Gets the DateTime that represents the date and time when the daylight-saving period ends.
Start Read-only

Gets the DateTime that represents the date and time when the daylight-saving period begins.
Public Methods
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString
(inherited from System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Globalization.DaylightTime Member Details

ctor #1
Summary
Initializes a new instance of the DaylightTime class.
C# Syntax:
public DaylightTime(
   DateTime start,
   DateTime end,
   TimeSpan delta
);
Parameters:

start

The DateTime that represents the date and time when the daylight-saving period begins. The value must be in local time.

end

The DateTime that represents the date and time when the daylight-saving period ends. The value must be in local time.

delta

The TimeSpan that represents the difference between the standard time and the daylight-saving time in ticks.

Remarks
The start parameter becomes the value of the DaylightTime.Start property of the new instance. The end parameter becomes the value of the DaylightTime.End property of the new instance. The delta parameter becomes the value of the DaylightTime.Delta property of the new instance.
See also:
DateTime | TimeSpan | DaylightTime.Start | DaylightTime.End | DaylightTime.Delta

Return to top


Property: Delta (read-only)
Summary
Gets the TimeSpan that represents the difference between the standard time and the daylight-saving time.
C# Syntax:
public TimeSpan Delta {get;}
Remarks
At the start of daylight-saving time, the clock time is advanced by the length of time specified in this property. At the end of daylight-saving time, the clock time is set back by the length of time specified in this property.

If this value is negative, the clock time is set back at the start of daylight-saving time and advanced at the end.

For example, in the United States, this property is a TimeSpan representing one hour.

See also:
TimeSpan | DaylightTime.Start | DaylightTime.End

Return to top


Property: End (read-only)
Summary
Gets the DateTime that represents the date and time when the daylight-saving period ends.
C# Syntax:
public DateTime End {get;}
Remarks
When the daylight-saving period ends, the clock time is set back to the standard time.
See also:
DateTime | DaylightTime.Start | DaylightTime.Delta

Return to top


Property: Start (read-only)
Summary
Gets the DateTime that represents the date and time when the daylight-saving period begins.
C# Syntax:
public DateTime Start {get;}
Remarks
When the daylight-saving period begins, the clock time is advanced by the number of ticks defined in DaylightTime.Delta to take advantage of the extended daylight hours.
See also:
DateTime | DaylightTime.End | DaylightTime.Delta

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~DaylightTime();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.