System.TimeZone.IsDaylightSavingTime Method

Returns a value indicating whether the specified date and time is within the specified daylight saving time period.

Syntax

public static bool IsDaylightSavingTime (DateTime time, System.Globalization.DaylightTime daylightTimes)

Parameters

time
A date and time.
daylightTimes
A daylight saving time period.

Returns

true if time is in daylightTimes; otherwise, false.

Remarks

The TimeZoneInfo.IsDaylightSavingTime(DateTime) method provides the same functionality as this overload of the TimeZone.IsDaylightSavingTime(DateTime, System.Globalization.DaylightTime) method. Whenever possible, use the TimeZoneInfo.IsDaylightSavingTime(DateTime) method.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0