Delegate SkippedTimeResolver
Resolves a LocalDateTime to a ZonedDateTime in 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).
Since 1.0.x
Availability net35-Client, PCL
Namespace: NodaTime.TimeZones
Assembly: NodaTime.dll
Syntax
public delegate ZonedDateTime SkippedTimeResolver(LocalDateTime localDateTime, DateTimeZone zone, ZoneInterval intervalBefore, ZoneInterval intervalAfter);
Parameters
Type | Name | Description |
---|---|---|
Local |
localDateTime | The local date and time to map to the given time zone |
Date |
zone | The target time zone |
Zone |
intervalBefore | The zone interval directly before the target local date and time would have occurred |
Zone |
intervalAfter | The zone interval directly after the target local date and time would have occurred |
Returns
Type | Description |
---|---|
Zoned |
A Zoned |
Remarks
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 Skipped
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.