Convert a Date to Unix Timestamp: Bash, Python, JS, SQL (2026)
Convert any date to a Unix timestamp in Bash, Python, JavaScript, and SQL with copy-paste one-liners — plus the timezone trap each language hides.
Tutorials, deep-dives, and privacy-first thinking about developer tools.
Showing 1–6 of 6 posts
Convert any date to a Unix timestamp in Bash, Python, JavaScript, and SQL with copy-paste one-liners — plus the timezone trap each language hides.
Learn how to compare logs across UTC, PST, and JST in one view: normalize to Unix time, then convert cleanly with IANA zone names and ISO 8601.
Postgres extract(epoch from now()) and MySQL UNIX_TIMESTAMP() both return a Unix timestamp, but the data type, precision, and timezone rules differ.
JWT exp, nbf, and iat are Unix timestamps in seconds. Learn to read them in 3 seconds, convert them to a date, and check token expiry by hand.
The Year 2038 problem overflows 32-bit Unix time on 19 Jan 2038. Here's who is still affected in 2026 and how to test your own systems for it.
Your JavaScript timestamp is in milliseconds while most backends use seconds, so it looks 1000× too big. Here is why, and how to convert it safely.