IsAmbiguousTime Method (DateTimeOffset)
Collapse the table of content
Expand the table of content

TimeZoneInfo.IsAmbiguousTime Method (DateTimeOffset)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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.

Version Notes

XNA Framework

 When this method is used in the XNA Framework, it throws a NotSupportedException exception.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft