DateTimeZone AtLeniently Method Noda Time

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

Maps the given LocalDateTime to the corresponding ZonedDateTime in a lenient manner: ambiguous values map to the earlier of the alternatives, and "skipped" values are shifted forward by the duration of the "gap".

Namespace: NodaTime
Assembly: NodaTime (in NodaTime.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax

public ZonedDateTime AtLeniently(
	LocalDateTime localDateTime
)

Return Value

Type: ZonedDateTime
The unambiguous mapping if there is one, the earlier result if the mapping is ambiguous, or the forward-shifted value if the given local date/time is skipped.
Remarks

See AtStrictly(LocalDateTime) and ResolveLocal(LocalDateTime, ZoneLocalMappingResolver) for alternative ways to map a local time to a specific instant.

Note: The behavior of this method was changed in version 2.0 to fit the most commonly seen real-world usage pattern. Previous versions returned the later instance of ambiguous values, and returned the start of the zone interval after the gap for skipped value. The previous functionality can still be used if desired, by using ResolveLocal(LocalDateTime, AmbiguousTimeResolver, SkippedTimeResolver) and passing the ReturnLater and ReturnStartOfIntervalAfter resolvers.

Version Information

Available since: 1.0.0
Supported in the PCL? Yes
See Also