Use this converter when your input is a calendar date or wall clock time and your output has to be a Unix timestamp. You will need to select the time zone first. A date like 2026-06-20 at 09:25 is not yet an instant until it is assigned to a place or UTC.

A dependable conversion process

  • Enter the date and time exactly as provided to you by the person or system.
  • Select the IANA timezone that owns that clock reading, e.g. America/New_York or Asia/Tokyo.
  • Unix-like APIs copy seconds and JavaScript copy milliseconds Date or systems that record that unit
  • Retain the timezone with the record when the schedule is defined in local business time.

Treat date ranges as half-open intervals

Convert the start of the reporting day and the start of the following day to the desired timezone. Greater than or equal to the first boundary and less than the second. This prevents the creation of a "end of day" with fractional seconds and behaves correctly when daylight saving time makes a local day shorter or longer.

The edge case of daylight saving time

Some local times are missing in a spring transition. In the fall transition, an hour happens twice. If the user is able to set these values, then store both the IANA timezone and the instant that was chosen rather than using the local clock of the server.

Frequent questions:

Q: How do I convert a date to epoch time?
A: Select the date, time, and timezone in the converter, then copy the Unix timestamp in seconds or milliseconds. Midnight without a timezone is ambiguous, so use the timezone that is the calendar day.
Q: Is the time to epoch the same as the date to epoch?
A: Yes. Both phrases are equivalent to converting a human readable wall clock value to the number of seconds or milliseconds since 1970-01-01 00:00:00 UTC.
Q: How do I convert a datetime to a Unix timestamp?
A: Enter the full datetime with its timezone. The converter returns the corresponding Unix seconds, Unix milliseconds, ISO 8601, and UTC values for the same instant.
Q: Should I use Unix seconds or milliseconds?
A: Use seconds for most of the backend languages, databases, and command-line tools but use milliseconds for JavaScript Date, browser APIs, Java, .NET, and analytics events.