Class SingleTransitionDateTimeZone
Time zone with a single transition between two offsets. This provides a simple way to test behaviour across a transition.
Since 1.0.x
Availability net35-Client, PCL
Implements
IEquatable<DateTimeZone>
Inherited Members
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetType()
Object.MemberwiseClone()
Namespace: NodaTime.Testing.TimeZones
Assembly: NodaTime.Testing.dll
Syntax
public sealed class SingleTransitionDateTimeZone : DateTimeZone, IEquatable<DateTimeZone>, IZoneIntervalMap
Constructors
SingleTransitionDateTimeZone(Instant, Offset, Offset)
Creates a zone with a single transition between two offsets.
Since 1.0.x
Availability net35-Client, PCL
Declaration
public SingleTransitionDateTimeZone(Instant transitionPoint, Offset offsetBefore, Offset offsetAfter)
Parameters
Type | Name | Description |
---|---|---|
Instant | transitionPoint | The transition point as an Instant. |
Offset | offsetBefore | The offset of local time from UTC before the transition. |
Offset | offsetAfter | The offset of local time from UTC before the transition. |
SingleTransitionDateTimeZone(Instant, Offset, Offset, String)
Creates a zone with a single transition between two offsets.
Since 1.1.x
Availability net35-Client, PCL
Declaration
public SingleTransitionDateTimeZone(Instant transitionPoint, Offset offsetBefore, Offset offsetAfter, string id)
Parameters
Type | Name | Description |
---|---|---|
Instant | transitionPoint | The transition point as an Instant. |
Offset | offsetBefore | The offset of local time from UTC before the transition. |
Offset | offsetAfter | The offset of local time from UTC before the transition. |
String | id | ID for the newly created time zone. |
SingleTransitionDateTimeZone(Instant, Int32, Int32)
Creates a zone with a single transition between two offsets.
Since 1.0.x
Availability net35-Client, PCL
Declaration
public SingleTransitionDateTimeZone(Instant transitionPoint, int offsetBeforeHours, int offsetAfterHours)
Parameters
Type | Name | Description |
---|---|---|
Instant | transitionPoint | The transition point as an Instant. |
Int32 | offsetBeforeHours | The offset of local time from UTC, in hours, before the transition. |
Int32 | offsetAfterHours | The offset of local time from UTC, in hours, before the transition. |
Properties
EarlyInterval
The ZoneInterval for the period before the transition, starting at the beginning of time.
Since 1.0.x
Availability net35-Client, PCL
Declaration
public ZoneInterval EarlyInterval { get; }
Property Value
Type | Description |
---|---|
ZoneInterval |
LateInterval
The ZoneInterval for the period after the transition, ending at the end of time.
Since 1.0.x
Availability net35-Client, PCL
Declaration
public ZoneInterval LateInterval { get; }
Property Value
Type | Description |
---|---|
ZoneInterval |
Transition
The transition instant of the zone.
Since 1.1.x
Availability net35-Client, PCL
Declaration
public Instant Transition { get; }
Property Value
Type | Description |
---|---|
Instant |
Methods
EqualsImpl(DateTimeZone)
Since 1.0.x
Availability net35-Client, PCL
Declaration
protected override bool EqualsImpl(DateTimeZone zone)
Parameters
Type | Name | Description |
---|---|---|
DateTimeZone | zone |
Returns
Type | Description |
---|---|
Boolean |
Overrides
GetHashCode()
Since 1.0.x
Availability net35-Client, PCL
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
GetZoneInterval(Instant)
Since 1.0.x
Availability net35-Client, PCL
Declaration
public override ZoneInterval GetZoneInterval(Instant instant)
Parameters
Type | Name | Description |
---|---|---|
Instant | instant |
Returns
Type | Description |
---|---|
ZoneInterval |
Overrides
Remarks
This returns either the zone interval before or after the transition, based on the instant provided.
Implements
System.IEquatable<T>