Convert4Me – Convert4Me home

Unix Timestamps Explained: Epoch Time, Seconds and Milliseconds

Updated October 22, 2026

A Unix timestamp is one number for a moment in time: the seconds that have passed since 1 January 1970 (UTC). Programs love it because it is simple, sortable and the same everywhere.

How it works

The count starts at the "epoch", 00:00:00 UTC on 1 January 1970. A timestamp of 0 is that moment, 86400 is exactly one day later, and 1700000000 is 14 November 2023 at 22:13:20 UTC.

Seconds, milliseconds and more

UnitDigits todayExampleCommon in
Seconds101700000000Unix, PHP, Python, many APIs
Milliseconds131700000000000JavaScript, Java
Microseconds161700000000000000Databases and logs
Nanoseconds191700000000000000000Go and fast timers

Converting in code

LanguageTimestamp to date
JavaScriptnew Date(1700000000 * 1000).toISOString()
Pythondatetime.fromtimestamp(1700000000, tz=timezone.utc)
PHPdate('c', 1700000000)
MySQLSELECT FROM_UNIXTIME(1700000000);
PostgreSQLSELECT to_timestamp(1700000000);

Common mistakes

  • Mixing seconds and milliseconds: a date in 1970 usually means you passed seconds where milliseconds were expected, and a date thousands of years away means the opposite.
  • Forgetting the time zone: a timestamp has none, but the date you display does. Store timestamps or UTC, and convert to local time only when showing it.
  • Using local midnight as a "date" and then comparing across time zones.

The year 2038 problem

A signed 32-bit number can hold at most 2,147,483,647, which is 19 January 2038 at 03:14:07 UTC. Systems that store a timestamp in 32 bits will overflow one second later. Most modern software uses 64 bits, which lasts for hundreds of billions of years, but old embedded systems and file formats may still be affected.

Frequently asked questions

What is a Unix timestamp for right now?

Open the Unix Timestamp Converter: it shows the current time in seconds and milliseconds and updates every second.

Does a Unix timestamp include leap seconds?

No. Unix time ignores leap seconds, so every day is exactly 86,400 seconds long.

Your privacy comes first. Your text and numbers stay in your browser and we never see them. If you allow it, we save what you type on this device and use Google Analytics to count visits. We never sell your data. Privacy Policy