Noda Time
SkippedTimeResolver Delegate
NamespacesNodaTime.TimeZonesSkippedTimeResolver

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

Resolves a LocalDateTime to a ZonedDateTime in the situation where the requested local time does not exist in the target time zone.
Declaration Syntax
C#Visual BasicVisual C++
public delegate ZonedDateTime SkippedTimeResolver(
	LocalDateTime localDateTime,
	DateTimeZone zone,
	ZoneInterval intervalBefore,
	ZoneInterval intervalAfter
)
Public Delegate Function SkippedTimeResolver ( _
	localDateTime As LocalDateTime, _
	zone As DateTimeZone, _
	intervalBefore As ZoneInterval, _
	intervalAfter As ZoneInterval _
) As ZonedDateTime
public delegate ZonedDateTime SkippedTimeResolver(
	LocalDateTime localDateTime, 
	DateTimeZone^ zone, 
	ZoneInterval^ intervalBefore, 
	ZoneInterval^ intervalAfter
)
Parameters
localDateTime (LocalDateTime)
The local date and time to map to the given time zone
zone (DateTimeZone)
The target time zone
intervalBefore (ZoneInterval)
The zone interval directly before the target local date and time would have occurred
intervalAfter (ZoneInterval)
The zone interval directly after the target local date and time would have occurred
Return Value
A ZonedDateTime in the target time zone.
Remarks

This delegate is used by CreateMappingResolver(AmbiguousTimeResolver, SkippedTimeResolver) when handling the situation where the requested local time does not exist, due to clocks moving forward in a time zone transition (usually due to a spring daylight saving transition).

The returned value will necessarily represent a different local date and time to the target one, but the exact form of mapping is up to the delegate implementation. For example, it could return a value as close to the target local date and time as possible, or the time immediately after the transition. Alternatively, it can throw a SkippedTimeException to implement a policy of "reject skipped times."

See the Resolvers class for predefined implementations.

Implementations of this delegate can reasonably assume that the target local date and time really is skipped; the behaviour when the local date and time can be directly mapped into the target time zone is undefined.

Exceptions
ExceptionCondition
SkippedTimeExceptionThe implementation rejects requests to map skipped times.

Assembly: NodaTime (Module: NodaTime.dll) Version: 1.2.0.0 (1.2.0)