Where to start First steps track · 15 stages
Linux Labs

Unix time ⇄ date

The current Unix time, and timestamps to dates and back, in seconds or milliseconds.

1790676000 or 2026-09-29 13:00
A number is Auto goes by the number of digits
Dates without a zone Which time zone to read them in
Paste a Unix timestamp or a date — both ways work.
In every format

The formats appear when the time is set.

Date
—
In a Linux terminal

The commands appear when the time is set.

Now, Unix time
—

Calculated in your browser — nothing is sent to the server

Practice on a machine

Lab “The portal fails over HTTPS”

medium ~25 min stage 4 of the “Web stack” track

Open the lab

In a Linux terminal

bash
date +%s # now, in seconds date +%s%3N # now, in milliseconds date -d @1790676000 # timestamp → local date date -u -d @1790676000 +'%F %T' # timestamp → UTC date date -d '2026-09-29 13:00' +%s # date → timestamp

On macOS and BSD, use date -r 1790676000 instead of date -d @….

Keep in mindJavaScript and Java count in milliseconds (13 digits); Linux and most databases in seconds (10 digits).

FAQ

How do I tell seconds from milliseconds?

By length: a timestamp in seconds has 10 digits today, in milliseconds 13. A date in 1970 means milliseconds were read as seconds.

Why is the date off by a few hours?

The timestamp is the same everywhere, but the date depends on the time zone: date -d @… uses the system zone, while logs and databases often use UTC.

What is the year 2038 problem?

On 19 January 2038 at 03:14:07 UTC, the timestamp outgrows a signed 32-bit integer, and where time_t is 32-bit, time jumps back to 1901. 64-bit Linux is not affected.

Loading…