Class DatabaseTimestamp

A timestamp value.

References:

Hierarchy

  • SerializableWrapper<Date>
    • DatabaseTimestamp

Constructors

Properties

epochType: EpochType = EpochType.PDB

The epoch to use when serializing this date.

value: Date = ...

JavaScript Date value corresponding to the time.

Methods

  • Type Parameters

    • JsonValueT extends Date

    Parameters

    Returns void

  • Parses a PDB timestamp.

    If the time has the top bit set, it's an unsigned 32-bit number counting from 1st Jan 1904.

    If the time has the top bit clear, it's a signed 32-bit number counting from 1st Jan 1970.

    Parameters

    • buffer: Buffer
    • Optionalopts: DeserializeOptions

    Returns number

  • Computes the serialized length of this value.

    Parameters

    • Optionalopts: SerializeOptions

    Returns number

  • Serializes this value into a buffer.

    Parameters

    • Optionalopts: SerializeOptions

    Returns Buffer

  • Returns any

  • Creates a new instance of this value by deserializing from a buffer.

    Type Parameters

    • T extends Serializable

    Parameters

    • this: (new () => T)
        • new (): T
        • Returns T

    • buffer: Buffer
    • Optionalopts: DeserializeOptions

    Returns T

  • Create a new instance of this wrapper class from a raw value.

    Type Parameters

    • ValueT
    • WrapperT extends SerializableWrapper<ValueT>

    Parameters

    Returns WrapperT