Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class NodaTime.​AmbiguousTimeException
Assembly: NodaTime
Inheritance: object → System.​Exception → System.​SystemException → System.​ArgumentException → System.​ArgumentOutOfRangeException → AmbiguousTimeException
Implemented Interfaces
- System.​Runtime.​Serialization.​ISerializable Implemented by: Exception
Exception thrown to indicate that the specified local date/time occurs twice in a particular time zone due to daylight saving time changes.
Remarks
<para>
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.
</para> <para>
This exception is used to indicate such problems, as they're usually
not the same as other <see cref="T:System.ArgumentOutOfRangeException" /> causes,
such as entering "15" for a month number.
</para> <para>
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.
</para>
Properties
public
DateTimeZone
Zone
The time zone in which the local date and time is ambiguous.
public
ZonedDateTime
EarlierMapping
Gets the earlier of the two occurrences of the local date and time within the time zone.
public
ZonedDateTime
LaterMapping
Gets the later of the two occurrences of the local date and time within the time zone.
public
object
ActualValue
public
string
Message
public
string
ParamName
public
string
HelpLink
public
int
HResult
InnerException
public
string
Source
public
string
StackTrace
TargetSite
Methods
public
void
GetObjectData​(System.​Runtime.​Serialization.​SerializationInfo info,
System.​Runtime.​Serialization.​StreamingContext context)
Inherited from System.​ArgumentOutOfRangeException
public
System.​Type
GetType​()
Inherited from System.​Exception
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object