Export (0) Print
Expand All

TimeZoneInfo.IsDaylightSavingTime Method (DateTimeOffset)

Indicates whether a specified date and time falls in the range of daylight saving time for the time zone of the current TimeZoneInfo object.

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

public bool IsDaylightSavingTime(
	DateTimeOffset dateTimeOffset
)

Parameters

dateTimeOffset
Type: System.DateTimeOffset

A date and time value.

Return Value

Type: System.Boolean
true if the dateTimeOffset parameter is a daylight saving time; otherwise, false.

The return value of TimeZoneInfo.IsDaylightSavingTime is affected by the relationship between the time zone represented by the TimeZoneInfo object and the Offset property of the dateTimeOffset parameter. If dateTimeOffset does not correspond to the current time zone's offset from Coordinated Universal Time (UTC), the method converts that time to the time in the current time zone. It then determines whether that date and time is a daylight saving time.

If the time zone represented by the TimeZoneInfo object does not support daylight saving time, the method always returns false.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5

Community Additions

ADD
Show:
© 2014 Microsoft