Delegate AmbiguousTimeResolver
Resolves a LocalDateTime to a ZonedDateTime in the situation
where the requested local time is ambiguous, due to clocks moving backward in a time zone transition
(usually due to an autumnal daylight saving transition).
Since 1.0.x
Availability net35-Client, PCL
Namespace: NodaTime.TimeZones
Assembly: NodaTime.dll
Syntax
public delegate ZonedDateTime AmbiguousTimeResolver(ZonedDateTime earlier, ZonedDateTime later);
Parameters
Type | Name | Description |
---|---|---|
ZonedDateTime | earlier | The earlier of the ambiguous matches for the original local date and time |
ZonedDateTime | later | The later of the ambiguous matches for the original local date and time |
Returns
Type | Description |
---|---|
ZonedDateTime | A ZonedDateTime in the target time zone, |
Remarks
The returned value should be one of the two parameter values, based on the policy of the specific implementation. Alternatively, it can throw a AmbiguousTimeException to implement a policy of "reject ambiguous times."
See the Resolvers class for predefined implementations.
Implementations of this delegate can reasonably assume that the target local date and time really is ambiguous; the behaviour when the local date and time can be unambiguously mapped into the target time zone (or when it's skipped) is undefined.