Noda Time
ZoneLocalMapping Class
NamespacesNodaTime.TimeZonesZoneLocalMapping

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

The result of mapping a LocalDateTime within a time zone, i.e. finding out at what "global" time the "local" time occurred.
Declaration Syntax
C#Visual BasicVisual C++
public sealed class ZoneLocalMapping
Public NotInheritable Class ZoneLocalMapping
public ref class ZoneLocalMapping sealed
Members
All MembersMethodsProperties



IconMemberDescription
Count
Returns the number of results within this mapping: the number of distinct ZonedDateTime values which map to the original LocalDateTime.

EarlyInterval
Returns the earlier ZoneInterval within this mapping. For unambiguous mappings, this is the same as LateInterval; for ambiguous mappings, this is the interval during which the mapped local time first occurs; for impossible mappings, this is the interval before which the mapped local time occurs.

First()()()()
Returns a ZonedDateTime which maps to the original LocalDateTime in the mapped DateTimeZone: either the single result if the mapping is unambiguous, or the earlier result if the local date/time occurs twice in the time zone due to a time zone offset change such as an autumnal daylight saving transition.

Last()()()()
Returns a ZonedDateTime which maps to the original LocalDateTime in the mapped DateTimeZone: either the single result if the mapping is unambiguous, or the later result if the local date/time occurs twice in the time zone due to a time zone offset change such as an autumnal daylight saving transition.

LateInterval
Returns the later ZoneInterval within this mapping. For unambiguous mappings, this is the same as EarlyInterval; for ambiguous mappings, this is the interval during which the mapped local time last occurs; for impossible mappings, this is the interval after which the mapped local time occurs.

LocalDateTime
Returns the LocalDateTime which was mapped with in the time zone.

Single()()()()
Returns the single ZonedDateTime which maps to the original LocalDateTime in the mapped DateTimeZone.

Zone
Returns the DateTimeZone in which this mapping was performed.

Remarks

This class is used as the return type of MapLocal(LocalDateTime). It allows for finely-grained handling of the three possible results:

  • Unambiguous mapping - The local time occurs exactly once in the target time zone.
  • Ambiguous mapping - The local time occurs twice in the target time zone, due to the offset from UTC changing. This usually occurs for an autumnal daylight saving transition, where the clocks are put back by an hour. If the clocks change from 2am to 1am for example, then 1:30am occurs twice - once before the transition and once afterwards.
  • Impossible mapping - The local time does not occur at all in the target time zone, due to the offset from UTC changing. This usually occurs for a vernal (spring-time) daylight saving transition, where the clocks are put forward by an hour. If the clocks change from 1am to 2am for example, then 1:30am is skipped entirely.
Thread Safety
This type is an immutable reference type. See the thread safety section of the user guide for more information.
Inheritance Hierarchy
Object
ZoneLocalMapping

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