Convert a timestamp in milliseconds to seconds.
When smart is true the function will try to detect already-second timestamps and return them unchanged (heuristic threshold). For example, small numbers (< 1e12) are likely seconds and are returned as-is.
smart
timestamp in milliseconds or seconds
enable heuristic detection (default: true)
timestamp in seconds
Convert a timestamp in milliseconds to seconds.
When
smartis true the function will try to detect already-second timestamps and return them unchanged (heuristic threshold). For example, small numbers (< 1e12) are likely seconds and are returned as-is.