Unix Timestamp Converter
Convert a Unix timestamp to a readable date in UTC and your local time zone, or turn a date back into a timestamp. Seconds and milliseconds are detected automatically.
Current Unix timestamp
…
What is a Unix timestamp?
A Unix timestamp (also called epoch time or POSIX time) is the number of seconds that have passed since January 1, 1970 at 00:00:00 UTC, not counting leap seconds. Because it is a single number with no time zone, it is the standard way to store and exchange moments in time between systems.
Seconds or milliseconds?
Most Unix tools, databases and APIs use seconds (10 digits for current dates). JavaScript's Date.now() and Java's System.currentTimeMillis() use milliseconds (13 digits). This converter treats very large numbers as milliseconds automatically.
Getting the current timestamp in code
# Bash
date +%s
# Python
import time; int(time.time())
// JavaScript (seconds)
Math.floor(Date.now() / 1000)
-- PostgreSQL
SELECT extract(epoch FROM now())::bigint;Converting a timestamp to a date in code
# Bash (GNU date)
date -u -d @1798761600
# Python
from datetime import datetime, timezone
datetime.fromtimestamp(1798761600, tz=timezone.utc)
// JavaScript
new Date(1798761600 * 1000).toISOString()The year 2038 problem
Systems that store timestamps as signed 32-bit integers overflow on January 19, 2038 at 03:14:07 UTC, the largest value they can hold. Modern systems use 64-bit integers, which will not overflow for billions of years — but old embedded devices and legacy databases may still be affected.
Scheduling jobs by time? Try our cron expression explainer and read about time zones in cron.