Unix timestamp

From a timestamp to a readable date, and back. Seconds, milliseconds, microseconds or nanoseconds.

Unix time now
ms
Timestamp → date

Date → timestamp

Good to know

What a Unix timestamp is
The number of seconds elapsed since 1 January 1970 at midnight UTC, not counting leap seconds. The same moment has the same timestamp everywhere in the world: time zones only matter when it is written as a date.
Seconds or milliseconds?
Unix, PHP, Python and most databases count in seconds (10 digits today), JavaScript and Java in milliseconds (13 digits). Some logs use microseconds (16) or nanoseconds (19). The page guesses from the number of digits, and says what it guessed.
The year 2038 problem
A signed 32-bit number stops at 2147483647, on 19 January 2038 at 03:14:07 UTC. Systems that still store time that way will then go back to 1901.

Transparency

Everything is computed in your browser, by the scripts listed below. Nothing you type leaves this page.

Enforced by your browser
This page's Content Security Policy allows a single destination, the site's audience measurement (connect-src https://stats.r-no.fr, see below), and forbids any form submission (form-action 'none'), so even a bug could not send what you type anywhere. You can read the policy at the top of the page source.
Audience measurement
Like every page of the site, this one counts its visit with Umami, installed on R-no’s own server (stats.r-no.fr). It receives the address of the page, without parameters or anchor, the site you came from (its domain only), your browser, system, language and screen size, and the country, region and city deduced from your IP address, which is not kept. It never receives what you type, nor the result of the tool. No cookie, nothing stored in your browser; if your browser asks not to be tracked (Do Not Track), nothing is measured. The data is erased after 25 months.
  • /commun/mesure.js: the filter applied before each sending, written for R-no Toolbox. 1.4 kB
    SHA-256 225eec74fd12623d82fc05ee7d222be629ce454d081c129e8d1e249ed37ee716
  • https://stats.r-no.fr/m.js: Umami’s tracker, open source (MIT), served by the measurement server. Its fingerprint is not shown here: it changes with each version of Umami, and you cannot check from your browser that it is the published code. For that part, you have to trust R-no.
What is stored
No cookie, and nothing in the address. What you type is never stored: it disappears when you reload or close the page. Your language is given by the address itself (/en/ or /fr/): nothing is stored to remember it. Like any website, the server records the download of the page and its files in its access logs (IP address, date and time, address requested, browser name). It never receives what you type.
Code that runs here
  • app.js: the conversions and the page, written for R-no Toolbox. Not minified, no third-party library. 13.9 kB
    SHA-256 f3820ae6f4afec4bd266803221c5d3484664be60c9550efb87b6d0038a28a3e2
  • textes.js: the French messages of the tool, shown by its script (the rest of the French page is written into its HTML when the site is built). It only defines texts, with no logic. 6.6 kB
    SHA-256 0de18cefd456fab75925920fe7cad89d86cfb0258e4e3eaa96701dd8e3d00905
  • /commun/langue.js: the language helper, the same on every page of the site. It reads the language of the page and gives the tool its messages in that language. It stores nothing. 1.6 kB
    SHA-256 80f76f69773ef628d36d09bf8387cfedebda4529210d7120649b6f5603310631
Your time zone
The local date is written in the time zone of your device, which your browser gives to the page. It is only used for display: it is never sent or stored.
How it was checked
Conversions were compared with GNU date on 1,000 random timestamps between 1900 and 2200, in UTC and in three time zones (Paris, New York, Kolkata), including the hours skipped or repeated when the clocks change. The tests run again before each release.
Check it yourself
Download a script and compare its fingerprint with the one above:
curl -s https://r-no.fr/dates/timestamp/app.js | shasum -a 256
Limits
Leap seconds are ignored, as in Unix time itself. Dates are shown in the Gregorian calendar, even before 1582. The written-out date and the name of your time zone come from your browser. Nanoseconds are kept exactly in the ISO dates, but the other lines are precise to the millisecond.