Unix timestamp converter

The Unix timestamp converter shows the current time as a timestamp, converts a timestamp to a date and time, and calculates the timestamp of a date and time in a chosen time zone.
Current time

The current time is shown in the browser. Please enable JavaScript.

Timestamp to date
A whole or decimal number. For dates before 1970, add a minus sign at the start.
Unit
Auto-detect picks the unit by the number of digits: seconds up to 11 digits, milliseconds up to 14, microseconds up to 17, and nanoseconds beyond that.
Detected unit: seconds.
Date to timestamp
The time is read in the chosen time zone, taking daylight saving time into account.
Converted.

Everything runs in your browser; nothing is sent or stored.

  • In the "Current time" section, the values update every second. To copy a fixed value, click "Pause".
  • In the "Timestamp to date" section, enter a whole or decimal number, with a minus sign for dates before 1970.
  • The unit is detected automatically, and you can also choose seconds, milliseconds, microseconds, or nanoseconds.
  • The date is shown in local time, in UTC, in ISO 8601, and in RFC 2822, with the relative time and the day of the week.
  • In the "Date to timestamp" section, choose a date, a time, and a time zone to get the timestamp in seconds and in milliseconds, and the UTC offset.
  • Copy any value with the "Copy" button next to it.

What is a Unix timestamp

A Unix timestamp, also called epoch time, is the number of seconds that have passed since January 1, 1970, at 00:00:00 UTC. The same moment has the same number everywhere in the world, so timestamps are well suited to storing dates and times in databases, log files, and APIs. The conversion to local time happens only when the date is displayed. Leap seconds are not counted, so every day is exactly 86,400 seconds long. On Linux, the command date +%s shows the current timestamp, and the command date -d @1700000000 converts a timestamp to a date.

Seconds, milliseconds, and smaller units

A timestamp in seconds currently has 10 digits, while JavaScript and Java store timestamps in milliseconds, with 13 digits. Some systems store time in microseconds, with 16 digits, or in nanoseconds, with 19 digits. With auto-detect, a value of up to 11 digits is read as seconds, a value of up to 14 digits as milliseconds, a value of up to 17 digits as microseconds, and a longer value as nanoseconds. The date is shown to the millisecond, and smaller fractions of a second are not shown.

Time zones and daylight saving time

When you convert a date to a timestamp, the result depends on the time zone: 12:00 in the America/New_York time zone comes four or five hours after 12:00 UTC, depending on the time of year. When daylight saving time starts, the clock moves forward one hour, so one hour does not exist on that day: on March 14, 2027, the clock in the America/New_York time zone jumps from 02:00 straight to 03:00, and 02:30 does not exist. When daylight saving time ends, the clock moves back one hour, so one hour occurs twice: on November 7, 2027, the clock in the America/New_York time zone goes back from 02:00 to 01:00, and 01:30 occurs twice. In both cases, the converter shows a message that explains this.

Examples

  • 0January 1, 1970, 00:00:00 (UTC), the Unix epoch, where the count starts.
  • 86400January 2, 1970, 00:00:00 (UTC), one day after the epoch.
  • 1000000000September 9, 2001, 01:46:40 (UTC).
  • 1700000000November 14, 2023, 22:13:20 (UTC).
  • 1700000000000the same moment, in milliseconds.
  • 2147483647January 19, 2038, 03:14:07 (UTC), the largest value of a signed 32-bit integer.
  • -1December 31, 1969, 23:59:59 (UTC), one second before the epoch.

Unix timestamp converter FAQ

Why do I get a date in January 1970 or one far in the future?

A wrong date appears when the chosen unit does not match the value. A value in seconds that is read as milliseconds gives a date in January 1970: for example, 1700000000 read as milliseconds is January 20, 1970. A value in milliseconds that is read as seconds gives a date tens of thousands of years from now. To fix it, choose "Auto-detect" or the correct unit.

Does a Unix timestamp depend on the time zone?

No. A Unix timestamp does not depend on the time zone, because it represents a single moment in time. The time zone affects only how the date is displayed: the same timestamp is shown in the "Local time" row in your device's time zone, and in the "UTC" row in UTC.

What is the year 2038 problem?

Systems that store the timestamp as a signed 32-bit integer reach the largest value, 2147483647, on January 19, 2038, at 03:14:07 (UTC). One second later, the value overflows to a negative number, which is read as December 13, 1901. Systems that store the timestamp as a 64-bit number are not affected by the problem.

Can I convert a date before 1970?

Yes. A date before January 1, 1970, is represented by a negative timestamp, for example -86400 for December 31, 1969. When you convert a date to a timestamp, you can choose any date from January 1 of the year 1.

Why does a message say the chosen time does not exist or occurs twice?

The message appears when the chosen time falls on a daylight saving time change in the chosen time zone. For a time that does not exist, the result uses the UTC offset from before the change, and for a time that occurs twice, the result uses the first occurrence. For an unambiguous result, enter the time in UTC and choose the UTC time zone, which has no daylight saving time.

Why is the current time different from the time on my server?

The current time is shown from your device's clock, so a difference of a few seconds or more usually comes from a clock that is not synchronized, on the device or on the server. On Linux, you can check clock synchronization with the timedatectl command.

Shopping cart

Your cart is emptyYou can start with one of our popular plans.

Site search

Accessibility

Text size
100%
Accessibility statement