Interface ITimeZoneConversionIterator
Provides the DifferenceTicks used to convert from FromTimeZone to ToTimeZone at the time given in the last call to MoveTo(Int64). IMPORTANT!! Inputs must be in SEQUENTIAL ascending chronological order to get correct results from a conversion iterator.
Namespace: FFT.TimeStamps
Assembly: FFT.TimeStamps.dll
Syntax
public interface ITimeZoneConversionIterator
Properties
| Improve this Doc View SourceDifferenceTicks
The difference in ticks for a direct conversion from FromTimeZone to ToTimeZone. IMPORTANT!! NOT to be confused with the utc offset for either timezone.
Declaration
long DifferenceTicks { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
FromTimeZone
The timezone that we are converting from.
Declaration
TimeZoneInfo FromTimeZone { get; }
Property Value
Type | Description |
---|---|
TimeZoneInfo |
ToTimeZone
The timezone that we are converting tp.
Declaration
TimeZoneInfo ToTimeZone { get; }
Property Value
Type | Description |
---|---|
TimeZoneInfo |
Methods
| Improve this Doc View SourceGetDateTime(Int64)
Advances the ITimeZoneConversionIterator with an internal call to MoveTo(Int64),
then performs a conversion and returns the result as a
Declaration
DateTime GetDateTime(long fromTimeZoneTicks)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | fromTimeZoneTicks | The time in FromTimeZone expressed in ticks. |
Returns
Type | Description |
---|---|
DateTime |
GetDateTimeOffset(Int64)
Advances the ITimeZoneConversionIterator with an internal call to MoveTo(Int64),
then performs a conversion and returns the result as a
Declaration
DateTimeOffset GetDateTimeOffset(long fromTimeZoneTicks)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | fromTimeZoneTicks | The time in FromTimeZone expressed in ticks. |
Returns
Type | Description |
---|---|
DateTimeOffset |
GetTicks(Int64)
Advances the ITimeZoneConversionIterator with an internal call to MoveTo(Int64), then performs a conversion and returns the result expressed in ticks in the ToTimeZone.
Declaration
long GetTicks(long fromTimeZoneTicks)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | fromTimeZoneTicks | The time in FromTimeZone expressed in ticks. |
Returns
Type | Description |
---|---|
System.Int64 |
MoveTo(Int64)
Advances the ITimeZoneConversionIterator to the given time expressed as ticks in FromTimeZone. Returns true if DifferenceTicks has changed since the last advance, false otherwise.
Declaration
bool MoveTo(long fromTimeZoneTicks)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | fromTimeZoneTicks |
Returns
Type | Description |
---|---|
System.Boolean |