Gemstone Common Library
Show/Hide TOC

# NtpTimeTag Class

Represents a standard Network Time Protocol (NTP) time-tag.

## Definition

Namespace: Gemstone
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.151 -- Release Build+cb63b4525778c53d196bb55bacd9a49fac1f0f07
C#
View Source Request Example

    [SerializableAttribute]
    public class NtpTimeTag : TimeTagBase

VB
View Source Request Example

    <SerializableAttribute>
    Public Class NtpTimeTag
    	Inherits TimeTagBase

C++
View Source Request Example

    [SerializableAttribute]
    public ref class NtpTimeTag : public TimeTagBase

JavaScript
View Source Request Example

    Gemstone.NtpTimeTag = function();

    Type.createClass(
    	'Gemstone.NtpTimeTag',
    	Gemstone.TimeTagBase);

Inheritance
  Object TimeTagBase NtpTimeTag

## Remarks

As recommended by RFC-2030, all NTP timestamps earlier than 3h 14m 08s UTC on 20 January 1968 are reckoned from 6h 28m 16s UTC on 7 February 2036. This gives the NtpTimeTag class a functioning range of 1968-01-20 03:14:08 to 2104-02-26 09:42:23.

## Constructors

NtpTimeTag(Decimal) | Creates a new NtpTimeTag, given number of seconds since 1/1/1900.
NtpTimeTag(Ticks) | Creates a new NtpTimeTag, given specified Ticks.
NtpTimeTag(UInt64) | Creates a new NtpTimeTag, given 64-bit NTP timestamp.
NtpTimeTag(SerializationInfo, StreamingContext) | Creates a new NtpTimeTag from serialization parameters.
NtpTimeTag(UInt32, UInt32) | Creates a new NtpTimeTag, given number of seconds and fractional seconds since 1/1/1900.

## Properties

BaseDateOffsetTicks | Gets ticks representing the absolute minimum time of this time-tag implementation. (Inherited from TimeTagBase)
Timestamp | Gets 64-bit NTP timestamp.
Value | Gets or sets number of seconds (including any fractional seconds) since base time. (Inherited from TimeTagBase)

## Methods

CompareTo(DateTime) | Compares the TimeTagBase with a DateTime. (Inherited from TimeTagBase)
CompareTo(Object) | Compares the TimeTagBase with the specified Object. (Inherited from TimeTagBase)
CompareTo(TimeTagBase) | Compares the TimeTagBase with another TimeTagBase. (Inherited from TimeTagBase)
Equals(DateTime) | Determines whether the specified DateTime is equal to the current TimeTagBase. (Inherited from TimeTagBase)
Equals(Object) | Determines whether the specified Object is equal to the current TimeTagBase. (Inherited from TimeTagBase)
Equals(TimeTagBase) | Determines whether the specified TimeTagBase is equal to the current TimeTagBase. (Inherited from TimeTagBase)
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object)
FromTicks | Gets 64-bit NTP timestamp given timestamp in Ticks.
GetBaseDateOffsetTicks(Decimal) | Gets proper NTP offset based on seconds value, see RFC-2030.
GetBaseDateOffsetTicks(Ticks) | Gets proper NTP offset based on timestamp value, see RFC-2030.
GetBaseDateOffsetTicks(UInt32) | Gets proper NTP offset based on most significant byte on seconds value, see RFC-2030.
GetHashCode | Serves as a hash function for the current TimeTagBase. (Inherited from TimeTagBase)
GetObjectData | Populates a SerializationInfo with the data needed to serialize the target object. (Inherited from TimeTagBase)
GetType | Gets the Type of the current instance. (Inherited from Object)
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object)
ToDateTime | Returns standard .NET DateTime representation for time-tag. (Inherited from TimeTagBase)
ToString | Returns basic textual representation for time-tag. (Inherited from TimeTagBase)
ToString(IFormatProvider) | Returns textual representation for time-tag using the specified provider. (Inherited from TimeTagBase)
ToString(String) | Returns textual representation for time-tag in the specified format. (Inherited from TimeTagBase)
ToString(String, IFormatProvider) | Returns textual representation for time-tag in the specified format using the specified provider. (Inherited from TimeTagBase)

## Fields

AlternateBaseTicks | Number of ticks since 2/7/2036 at 6h 28m 16s UTC when MSB is set.
BaseTicks | Number of ticks since 1/1/1900.

## Extension Methods

GetEnumValueOrDefault | Gets the enumeration constant for value, if defined in the enumeration, or a default value. (Defined by EnumExtensions)
GetEnumValueOrDefaultT | Gets the enumeration constant for this value, if defined in the enumeration, or a default value. (Defined by EnumExtensions)

## See Also

#### Reference

Gemstone Namespace