Time Converters

Convert timestamps, timezones, epochs — 4 free tools in our Converters category.

All 4 tools

Time is the area where plausible-looking code most often turns out to be wrong. These tools cover the conversions involved and, just as usefully, make the common failure modes visible.

Seconds or milliseconds?

Count the digits. A current-era timestamp in seconds has 10 digits; in milliseconds it has 13, and in microseconds 16. Unix tools, Python's time.time() and Go use seconds. JavaScript's Date.now() and Java use milliseconds. Mixing them puts your date either in January 1970 or tens of thousands of years in the future — and a date showing as 1 January 1970 almost always means the value was zero, null or an empty string rather than that something genuinely happened then.

Timestamps have no timezone

A Unix timestamp is an absolute count of seconds since 1970-01-01 00:00:00 UTC, identical everywhere on Earth. A timezone only enters when you format it for display. This is exactly why timestamps are the right thing to store and timezone is a presentation concern.

Offsets are also not all whole hours. India is UTC+05:30, Nepal UTC+05:45, and parts of Australia UTC+08:45. Assuming whole hours is a recurring scheduling bug, as is assuming a location's offset never changes.

The two remaining traps

Daylight saving. Regions change clocks on different dates, so "9am New York time" moves relative to London twice a year. Schedule in UTC where you can, and avoid the hour that shifts — a job set for 02:30 local may be skipped or run twice.

Inclusive versus exclusive dates. From 1 March to 3 March is two nights but three days if both ends count. Contracts and notice periods usually mean the inclusive reading.

Frequently Asked Questions

What is the year 2038 problem?▼

A signed 32-bit integer counting seconds overflows on 19 January 2038 at 03:14:07 UTC and wraps round to 1901. Any system still storing time in a 32-bit `time_t` is affected. 64-bit timestamps push the limit hundreds of billions of years out.

Do Unix timestamps account for leap seconds?▼

No, by deliberate design. Unix time treats every day as exactly 86,400 seconds and does not count the leap seconds that have occurred, so it is not a true count of elapsed SI seconds since the epoch — though it does stay aligned with civil time.

Why store dates as ISO 8601 text rather than a timestamp?▼

Both are defensible. ISO 8601 (`2024-01-15T14:30:00Z`) sorts correctly as plain text, is human-readable, is unambiguous about offset, and handles dates before 1970 that some libraries mishandle as negative timestamps. Timestamps are more compact and simpler to do arithmetic on.