ForHosting KIT · Dates & time

NTP ↔ Unix timestamp

Unix time 0 is NTP 2208988800: the same instant, midnight on 1 January 1970, counted from two different starting points. Convert either number into the other and see the matching date and time in ISO 8601. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Conversion direction
Unix to ntp
Unix timestamp (seconds)
0
You get
NTP timestamp (seconds)
2,208,988,800
ISO date and time
1970-01-01T00:00:00.000Z

Convert NTP timestamps (seconds since 1900-01-01) to Unix time and ISO-8601 and back.

Two clocks that start counting in different years

An NTP timestamp and a Unix timestamp both measure time as a plain count of seconds, but they start from different dates. NTP counts from the first second of 1 January 1900, while Unix time counts from 1 January 1970. Because both clocks tick at the same rate, the gap between them never changes: it is always 2208988800 seconds. That is why Unix time 0 and NTP 2208988800 name the same instant. Converting is therefore a single subtraction or addition, and the converter also writes the instant as a calendar date and time so you can read it at a glance.

Mistakes this conversion helps you avoid

The most common slip is reading a value with the wrong starting date in mind. An NTP number read as if it were Unix time lands decades in the future, and a Unix number read as NTP lands back near 1900. Choosing the direction explicitly removes that doubt. The converter also refuses empty entries and values that are not numbers before doing any arithmetic, so a typo produces a clear message instead of a believable but wrong date. Every result is calculated the same way each time, with nothing looked up online.

Edge cases and limits

Empty strings, wrong types, and contradictory ranges are rejected early. Civil dates without timezone are calendar dates. Embedded tables travel inside the capability folder with no network calls at runtime.

Review examples before integrating.

Daily work

Get a reliable answer without a spreadsheet.

What is an NTP timestamp?

It is a count of the seconds that have passed since 1 January 1900. A Unix timestamp counts the same seconds from 1 January 1970, so both numbers can describe one instant.

How do I convert an NTP timestamp to Unix time?

Subtract 2208988800, the number of seconds between the two starting dates. Going the other way, add 2208988800 to the Unix value to get the NTP one.

What does an NTP value of 2208988800 correspond to?

It is Unix time 0, the very start of 1 January 1970 in UTC. The converter shows that moment as 1970-01-01 with the time at midnight.

Can I convert in both directions?

Yes. Choose whether you start from an NTP value or from a Unix value, enter the number, and you get the other count together with the date and time it represents.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/date/ntp-timestamp

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/date/ntp-timestamp \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"direction":"unix_to_ntp","unix_seconds":0}'
{
  "direction": "unix_to_ntp",
  "unix_seconds": 0
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "date.ntp_timestamp",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

How it works

Convert NTP timestamps (seconds since 1900-01-01) to Unix time and ISO-8601 and back. The calculation is fully deterministic and runs free in your browser with the same pure function as the API. Inputs are validated before arithmetic so bad types become clear invalid_input errors. Additional guidance covers validation order, deterministic results, browser and API parity, stable error match strings for certification, and safe handling of out-of-range floating values. Additional guidance covers validation order, deterministic results, browser and API parity, stable error match strings for certification, and safe handling of out-of-range floating values.

Inputs and outputs

Optional fields use documented defaults. Required schema fields must be present and typed. Success payloads always include the primary output fields so UI bindings stay stable. Extremely large intermediates that overflow IEEE-754 become out-of-range errors rather than nulls. Additional guidance covers validation order, deterministic results, browser and API parity, stable error match strings for certification, and safe handling of out-of-range floating values. Additional guidance covers validation order, deterministic results, browser and API parity, stable error match strings for certification, and safe handling of out-of-range floating values.

Edge cases and limits

Additional guidance covers validation order, deterministic results, browser and API parity, stable error match strings for certification, and safe handling of out-of-range floating values. Additional guidance covers validation order, deterministic results, browser and API parity, stable error match strings for certification, and safe handling of out-of-range floating values.

Automation

Same pure function in widget and API.

Teaching

Stable golden fixtures for demos.

Is it free?

Yes, tier A in the browser.

Network?

No network; parse on-device.

Invalid input?

invalid_input with a clear match.

Stable?

Deterministic goldens freeze the contract.

Author?

samurai.

Read the full KIT documentation →