[This is preliminary documentation and is subject to change.]

C# | Visual Basic | Visual C++ |
[SerializableAttribute] public sealed class AmbiguousTimeException : ArgumentOutOfRangeException
<SerializableAttribute> _ Public NotInheritable Class AmbiguousTimeException _ Inherits ArgumentOutOfRangeException
[SerializableAttribute] public ref class AmbiguousTimeException sealed : public ArgumentOutOfRangeException

All Members | Constructors | Properties | |||
Icon | Member | Description |
---|---|---|
![]() | AmbiguousTimeException(ZonedDateTime, ZonedDateTime) |
Constructs an instance from the given information.
|
![]() | EarlierMapping |
The earlier of the two occurrences of the local date and time within the time zone.
|
![]() | LaterMapping |
The later of the two occurrences of the local date and time within the time zone.
|
![]() | Zone |
The time zone in which the local date and time is ambiguous.
|

This occurs for transitions where the clock goes backward (usually by an hour). For example, suppose the time zone goes backward at 2am, so the second after 01:59:59 becomes 01:00:00. In that case, times such as 01:30:00 occur twice.
This exception is used to indicate such problems, as they're usually not the same as other ArgumentOutOfRangeException causes, such as entering "15" for a month number.
In theory this isn't calendar-specific; the local value will be ambiguous in this time zone regardless of the calendar used. However, this exception is always created in conjunction with a specific calendar, which leads to a more natural way of examining its information and constructing an error message.


Object | |||||
![]() | Exception | ||||
![]() | SystemException | ||||
![]() | ArgumentException | ||||
![]() | ArgumentOutOfRangeException | ||||
![]() | AmbiguousTimeException |
Assembly: NodaTime (Module: NodaTime.dll) Version: 1.2.0.0 (1.2.0)