Skip to content
ToolsFort home

Date to Unix Timestamp Converter

Convert a calendar date and time to a Unix timestamp in seconds and milliseconds, in local time or UTC.

Updated

Current Unix time: —
Unix timestamp (seconds)
—
Milliseconds
—
ISO 8601 (UTC)
—
Relative
—

Need an epoch value for an API call, a database query or a cron job? Pick a date and time and get the Unix timestamp instantly.

How to use the Date to Unix Timestamp Converter

  1. 1 Choose a date and time (seconds are optional).
  2. 2 Choose whether it is in your local time zone or UTC.
  3. 3 Copy the timestamp in seconds or milliseconds.

Formula

Timestamp (s)  = (date − 1970-01-01T00:00:00Z) in seconds
Timestamp (ms) = seconds × 1000

Worked examples

Start of 2030 (UTC)

Input: 2030-01-01 00:00:00 UTC

Result: 1893456000

Milliseconds: 1893456000000

Local time vs. UTC

The same wall-clock time corresponds to different timestamps in different time zones. "Local" uses your device's time zone (including daylight saving rules); "UTC" treats the entered time as Coordinated Universal Time.

Seconds or milliseconds?

Most Unix tools, PHP and Python use seconds. JavaScript, Java and many JSON APIs use milliseconds — multiply by 1,000.

Frequently asked questions

How do I get the current Unix timestamp?

It is shown live at the top of the tool; click "Use now" to fill the form with the current time.

Does daylight saving time affect the timestamp?

The timestamp itself is DST-free, but converting a local wall-clock time depends on whether DST applied at that date.

What timestamp is 1 January 1970?

Zero, when interpreted in UTC.

Esc