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.

Quick answer: a Unix timestamp is the number of seconds since 00:00:00 UTC on 1 January 1970. Today it has 10 digits; a 13-digit number is the same thing in milliseconds. Divide by 1000 to get seconds, or paste it into the Timestamp Converter to see the date.

In this article
  1. What Unix time is
  2. Seconds, milliseconds or microseconds?
  3. How to convert
  4. Unix timestamp examples
  5. Timestamps are always UTC
  6. Writing dates people and machines agree on
  7. The year 2038 problem
  8. Leap seconds
  9. Timestamps in spreadsheets
  10. 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.

Unix timestamp examples

Timestamp (seconds)Date and time (UTC)
01 January 1970, 00:00:00
10000000009 September 2001, 01:46:40
170000000014 November 2023, 22:13:20
200000000018 May 2033, 03:33:20
214748364719 January 2038, 03:14:07 (the largest value a signed 32-bit number can hold)

The same moments in milliseconds simply have three more zeros, for example 1700000000000.

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.

Converting timestamps in Excel and JavaScript

For a single value, paste it into the Unix Timestamp Converter. For a whole column or for code, these formulas do the same job.

Excel and Google Sheets

If cell A2 holds a timestamp in seconds, put this in B2 and format B2 as a date and time:

=A2/86400+DATE(1970,1,1)

For milliseconds (13 digits), divide by 86400000 instead. The result is in UTC. To show Pakistan time, add 5 hours with +5/24 at the end. To go the other way, from a date in B2 back to seconds, use =(B2-DATE(1970,1,1))*86400.

JavaScript

  • Current time in seconds: Math.floor(Date.now() / 1000)
  • Seconds to a readable date: new Date(1767225600 * 1000).toISOString() gives 2026-01-01T00:00:00.000Z
  • Date to seconds: Math.floor(new Date("2026-01-01T00:00:00Z").getTime() / 1000)
  • Local time in a chosen zone: new Date(1767225600 * 1000).toLocaleString("en-GB", { timeZone: "Asia/Karachi" })

The most common bug is mixing seconds and milliseconds. JavaScript dates use milliseconds, while most APIs and databases use seconds, so always multiply or divide by 1000 at the boundary.

Frequently asked questions

What is a Unix timestamp?

The number of seconds since 1 January 1970 at midnight UTC.

Why do some timestamps have 13 digits?

They count milliseconds instead of seconds.

Do Unix timestamps include time zones?

No. They are always UTC. Time zones are applied when the time is displayed.

What is the year 2038 problem?

Systems that store timestamps as 32-bit numbers overflow on 19 January 2038.

How do I convert a timestamp to a date?

Paste it into a timestamp converter and choose your time zone.

What is a Unix timestamp?

It is a count of the seconds that have passed since 00:00:00 UTC on 1 January 1970, ignoring leap seconds. Computers use it because a single number is easy to store, sort and compare.

How do I know if a timestamp is in seconds or milliseconds?

Count the digits. Current dates are 10 digits in seconds and 13 digits in milliseconds. If a converter shows a date in 1970 or far in the future, you probably used the wrong unit.

Is a Unix timestamp the same in every time zone?

Yes. It always counts from UTC, so the same moment has the same timestamp everywhere. Only the date you display changes with the time zone.

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