Unix seconds provide a compact comparison key for timestamps. The conversion still depends on a clear timezone convention for incoming text.
Worked example
SELECT unixepoch('2026-01-01') AS seconds;Result
[
{
"seconds": 1767225600
}
]Implementation notes
Seconds discard subsecond resolution unless the expression explicitly preserves it. Avoid using seconds alone as a unique ordering key for rapid events.
Try it yourself
Compare a UTC timestamp with the equivalent explicit offset.
Open the SQL example →Editorial date August 25, 2025 · Published December 6, 2026