zeed
    Preparing search index...

    Function timestampSecondsToMilliseconds

    • Convert a timestamp in seconds to milliseconds.

      When smart is true the function tries to detect already-millisecond values and returns them unchanged (heuristic threshold). Very large numbers (> 1e12) are assumed to already be milliseconds.

      Parameters

      • ts: number

        timestamp in seconds or milliseconds

      • smart: boolean = true

        enable heuristic detection (default: true)

      Returns number

      timestamp in milliseconds