Class ZoneLocalMapping
Inherited Members
Namespace: NodaTime.TimeZones
Assembly: NodaTime.dll
Syntax
public sealed class ZoneLocalMapping
Remarks
This class is used as the return type of MapLocal(LocalDateTime). It allows for finely-grained handling of the three possible results:
- Unambiguous mappingThe 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.
Properties
Count
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
This class is used as the return type of MapLocal(LocalDateTime). It allows for finely-grained handling of the three possible results:
- Unambiguous mappingThe 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.
EarlyInterval
Declaration
public ZoneInterval EarlyInterval { get; }
Property Value
Type | Description |
---|---|
ZoneInterval |
Remarks
This class is used as the return type of MapLocal(LocalDateTime). It allows for finely-grained handling of the three possible results:
- Unambiguous mappingThe 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.
LateInterval
Declaration
public ZoneInterval LateInterval { get; }
Property Value
Type | Description |
---|---|
ZoneInterval |
Remarks
This class is used as the return type of MapLocal(LocalDateTime). It allows for finely-grained handling of the three possible results:
- Unambiguous mappingThe 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.
LocalDateTime
Declaration
public LocalDateTime LocalDateTime { get; }
Property Value
Type | Description |
---|---|
LocalDateTime |
Remarks
This class is used as the return type of MapLocal(LocalDateTime). It allows for finely-grained handling of the three possible results:
- Unambiguous mappingThe 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.
Zone
Declaration
public DateTimeZone Zone { get; }
Property Value
Type | Description |
---|---|
DateTimeZone |
Remarks
This class is used as the return type of MapLocal(LocalDateTime). It allows for finely-grained handling of the three possible results:
- Unambiguous mappingThe 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.
Methods
First()
Declaration
public ZonedDateTime First()
Returns
Type | Description |
---|---|
ZonedDateTime | The unambiguous result of mapping a local date/time in a time zone. |
Remarks
This class is used as the return type of MapLocal(LocalDateTime). It allows for finely-grained handling of the three possible results:
- Unambiguous mappingThe 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.
Exceptions
Type | Condition |
---|---|
SkippedTimeException | The local date/time was skipped in the time zone. |
Last()
Declaration
public ZonedDateTime Last()
Returns
Type | Description |
---|---|
ZonedDateTime | The unambiguous result of mapping a local date/time in a time zone. |
Remarks
This class is used as the return type of MapLocal(LocalDateTime). It allows for finely-grained handling of the three possible results:
- Unambiguous mappingThe 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.
Exceptions
Type | Condition |
---|---|
SkippedTimeException | The local date/time was skipped in the time zone. |
Single()
Declaration
public ZonedDateTime Single()
Returns
Type | Description |
---|---|
ZonedDateTime | The unambiguous result of mapping the local date/time in the time zone. |
Remarks
This class is used as the return type of MapLocal(LocalDateTime). It allows for finely-grained handling of the three possible results:
- Unambiguous mappingThe 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.
Exceptions
Type | Condition |
---|---|
SkippedTimeException | The local date/time was skipped in the time zone. |
AmbiguousTimeException | The local date/time was ambiguous in the time zone. |