milvus-logo
Star
0
Forks
0
快速开始

Module Utils

Functions

Const datetimeToHybrids

  • Generate a hybrid timestamp based on datetime。

    Parameters

    • datetime: Date

    Returns string

    Property Type Description
    Hybrid timetamp String Hybrid timetamp is a non-negative interger range from 0 to 18446744073709551615.

    Example

      const res = datetimeToHybrids("429642767925248000");
    

Const hybridtsToUnixtime

  • Convert a hybrid timestamp to UNIX Epoch time ignoring the logic part.

    Parameters

    • hybridts: string | BigInt

    Returns string

    Property Description
    unixtime as string The Unix Epoch time is the number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT).

    Example

      const res = hybridtsToUnixtime("429642767925248000");
    

Const unixtimeToHybridts

  • Generate a hybrid timestamp based on Unix Epoch time, timedelta and incremental time internval.

    Parameters

    • unixtime: string | BigInt

    Returns string

    Property Type Description
    Hybrid timetamp String Hybrid timetamp is a non-negative interger range from 0 to 18446744073709551615.

    Example

      const res = unixtimeToHybridts("429642767925248000");