Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

TimeZoneInfo.IsAmbiguousTime Method (DateTimeOffset)

Determines whether a particular date and time in a particular time zone is ambiguous and can be mapped to two or more Coordinated Universal Time (UTC) times.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)
public bool IsAmbiguousTime(
	DateTimeOffset dateTimeOffset
)

Parameters

dateTimeOffset
Type: System.DateTimeOffset

A date and time.

Return Value

Type: System.Boolean
true if the dateTimeOffset parameter is ambiguous in the current time zone; otherwise, false.

An ambiguous time falls within a range of times for the current time zone. This means that it can be either a standard time or a time that results from the application of an adjustment rule. Typically, ambiguous times result when the clock is set to return to standard time from daylight saving time. Coordinated Universal Time (UTC) has no ambiguous times; neither do time zones that do not support daylight saving time.

The precise behavior of the method depends on the relationship between the Offset property of the dateTimeOffset parameter and the current time zone. If the value of the Offset property is a possible offset from the UTC of the current time zone, the method determines whether that date and time is ambiguous. Otherwise, it converts dateTimeOffset to the time in the current time zone, and then determines whether that date and time is ambiguous.

Notes to Callers

On Windows XP systems, this method applies only the current adjustment rule if the current instance is TimeZoneInfo.Local. As a result, the method may not accurately report whether dateTimeOffset is an ambiguous time for periods before the current adjustment rule came into effect. For more information, see the Notes for Callers section in the Local property.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

.NET for Windows Store apps

Supported in: Windows 8

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone 8, Silverlight 8.1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.