Developer Tools

Unix Timestamps Explained – Seconds, Milliseconds and Time Zones

Numbers like 1767225600 appear in logs, APIs and databases. They are simply a count of seconds – once you know the rules, converting them is easy.

In this article
  1. What Unix time is
  2. Seconds, milliseconds or microseconds?
  3. How to convert
  4. Timestamps are always UTC
  5. Writing dates people and machines agree on
  6. The year 2038 problem
  7. Leap seconds
  8. Timestamps in spreadsheets
  9. Handy calculations

What Unix time is

Unix time counts the seconds since 00:00:00 UTC on 1 January 1970, a moment called the “epoch”. So 0 is the start of 1970, 86400 is one day later, and 1767225600 is 1 January 2026 at midnight UTC. Computers like this format because it is a single number that is easy to store, compare and do arithmetic with, with no time zones or daylight saving to worry about.

Unix Timestamp ConverterConvert Unix timestamps in seconds, milliseconds or microseconds to readable dates in UTC and your time zone – or turn any date into a timestamp. Live clock.
Open the free tool

Seconds, milliseconds or microseconds?

Digits (today)UnitCommon in
10SecondsUnix, PHP, Python time(), JWTs, most APIs
13MillisecondsJavaScript Date.now(), Java
16MicrosecondsSome databases and high-precision logs

The Timestamp Converter detects the unit from the number of digits. If you ever see a date in January 1970, a seconds value was probably read as milliseconds.

How to convert

  1. Paste a timestamp – or a date such as 2026-01-01 12:00 – into the converter.
  2. Read it as UTC, ISO 8601, RFC 2822, your local time and a relative description such as “in 3 days”.
  3. Use the live current Unix time, with one-click copy, for testing.

Timestamps are always UTC

A timestamp represents a single moment worldwide. Local time is applied only when displaying it. A subscription that expires at 1767225600 expires at midnight UTC – which is 5:00 in the morning in Pakistan and 7:00 pm on 31 December in New York. Many “it expired early” support tickets come down to this.

Writing dates people and machines agree on

Use ISO 8601: 2026-11-20T14:30:00Z. The Z means UTC; offsets such as +05:00 state a local zone. Avoid formats like 03/04/2026, which means 3 April in Pakistan and the UK but March 4 in the USA.

The year 2038 problem

Older systems store Unix time as a signed 32-bit number, which runs out at 03:14:07 UTC on 19 January 2038, when it wraps around to 1901. Modern systems use 64-bit numbers that will last for billions of years, but embedded devices and old databases may still be affected – similar to the Y2K issue.

Leap seconds

Unix time ignores leap seconds: every day is treated as exactly 86,400 seconds. That keeps calculations simple and is why converters and JavaScript agree.

Timestamps in spreadsheets

Excel and Google Sheets store dates as days since 1899-12-30, not seconds since 1970. To turn a Unix timestamp in cell A1 into a spreadsheet date, use =A1/86400+DATE(1970,1,1) and format the cell as a date – remembering the result is in UTC. For milliseconds, divide by 86,400,000 instead.

Handy calculations

  • 1 hour = 3,600 s; 1 day = 86,400 s; 30 days = 2,592,000 s.
  • Expiry in 7 days: current timestamp + 604,800.
  • Difference between two timestamps ÷ 86,400 = days between them.

For calendar maths with real dates, the Date Calculator is easier. To inspect expiry times inside login tokens, use the JWT Decoder.

Unix Timestamp ConverterConvert Unix timestamps in seconds, milliseconds or microseconds to readable dates in UTC and your time zone – or turn any date into a timestamp. Live clock.
Open the free tool
Keep reading

Related articles

All articles
Calc

How to Count Days Between Dates for Deadlines and Notice Periods

“Within 30 days”, “10 working days”, “one month’s notice” – simple phrases that cause real arguments. Here is how to count dates correctly.

3 min read
Dev

What Is a JWT? JSON Web Tokens Explained Simply

Log into most modern apps and you receive a JWT – a compact token that proves who you are. Here is what is inside one and how to debug the common problems.

3 min read
Dev

UUID v4 vs v7: Which Should You Use for IDs and Database Keys?

UUIDs let systems create IDs anywhere without asking a central server. The newer version 7 fixes a real performance problem with the classic random v4.

3 min read