Convert a Unix timestamp in seconds or milliseconds to a readable date in your time and any timezone, and to the Hijri date on the Umm al-Qura calendar, or turn any date into Unix time.
Convert nowSimple steps, all in your browser with no sign-up.
Or press Now.
Your time, any zone and Hijri.
Any value in one click.
The number of seconds since 1 January 1970 UTC. Databases, logs and APIs use it because it is a single number unaffected by timezones. A 13-digit number is in milliseconds, as in JavaScript.
| Language | Current time in seconds |
|---|---|
| PHP | time() |
| JavaScript | Math.floor(Date.now() / 1000) |
| Python | int(time.time()) |
| MySQL | UNIX_TIMESTAMP() |
| Linux | date +%s |
It is calculated by your browser using the Umm al-Qura calendar used in Saudi Arabia. Months tied to moon sighting, such as Ramadan and Shawwal, may differ by a day from the official announcement, so follow the announcement for occasions.
Scheduling a job? Use the cron generator, and remember servers usually run on UTC.
| Code | Language |
|---|---|
date('Y-m-d H:i', $ts) | PHP |
new Date(ts * 1000).toISOString() | JavaScript |
datetime.fromtimestamp(ts, tz=timezone.utc) | Python |
FROM_UNIXTIME(ts) | MySQL |
date -d @1767225600 | Linux |
Short definitions of what you meet along the way.
Did not find your answer? Ask us on WhatsApp
Servers usually run on UTC and your computer on local time. The Unix timestamp itself is the same.
Old systems that store time in 32 bits overflow on 19 January 2038. Modern systems use 64 bits.
Once the page is open, all calculations run in your browser.
We build booking, reporting and scheduled-task systems.
We use necessary cookies to run the site, and Google Analytics to measure visits only if you agree. You can change your choice at any time from “Cookie settings”. Privacy policy