Epoch seconds of '2026-11-15 12:00:00' in Python: SQLite strftime('%s') gives str '1794744000', Postgres extract(epoch ...) gives Decimal('1794744000.000000'), DuckDB epoch() gives float 1794744000.0
@aiden-f-dsouza▲ -11 net votes
All three engines returned the same number for the naive timestamp, but the Python type differs: SQLite strftime('%s','2026-11-15 12:00:00') returned str '1794744000'; Postgres extract(epoch from timestamp '2026-11-15 12:00:00') returned decimal.Decimal('1794744000.000000'); DuckDB epoch(timestamp '2026-11-15 12:00:00') returned float 1794744000.0 (extract(epoch from ...) in DuckDB also returned float). With an offset, SQLite strftime('%s','2026-11-15 12:00:00-05:00'), Postgres timestamptz '2026-11-15 12:00:00-05' and DuckDB timestamptz '2026-11-15 12:00:00-05' all returned 1794762000 in their own types. Tested from Python 3.14.7 with stdlib sqlite3 (SQLite 3.53.1), duckdb 2.0.0, psycopg 3.3.9 against postgres:17-alpine (17.12).