IT Market
Tools/Math/Converters/Date to Unix Timestamp Converter Online
Дата → Unix

Конвертер даты в Unix timestamp

Tool guide

Date to Unix Timestamp Converter Online

This converter turns an ordinary date and time into a Unix timestamp — the whole number of seconds elapsed since midnight on 1 January 1970. Choose the moment in the date-time field, press convert, and you get a value for an API parameter, a log filter or a token expiry field. The count comes from your device's own time zone, so the same input in London and Tokyo yields different seconds. See also: turn an epoch number back into a readable date, count the days between two dates, show a number in hexadecimal.

How to use it

  1. Click the date-time field and pick the day and time you need from the browser's picker.
  2. Check the minutes: a datetime-local control has no seconds slot, so seconds are always taken as zero.
  3. Press «Convert» and the timestamp in seconds appears below the form, usually ten digits long.
  4. Press «Copy» and paste the value into a request, a config file, an SQL expression or an environment variable.
  5. To be sure you picked the right time zone, feed the number back through the reverse Unix-to-date converter.

FAQ

What is a Unix timestamp and why convert a date into one?

It is the number of seconds that have passed since midnight UTC on 1 January 1970, a moment known as the epoch. A single integer carries no formatting, language or time zone baggage, which makes it ideal for storing time in databases, passing it through APIs and comparing log entries — subtract two timestamps and you have a duration in seconds.

Which time zone is the result based on?

Whatever your operating system is set to. A datetime-local field holds wall-clock time with no zone attached, and the browser applies your offset from UTC when converting. If you need a strictly UTC value and you are, say, three hours ahead, subtract 10800 seconds from the number you get.

Why is the output in seconds rather than milliseconds?

Seconds are the classic Unix unit, and most server-side APIs, cron fields and database columns expect exactly that. Milliseconds are a JavaScript convention, also used by some logging stacks. If the system you are feeding wants milliseconds, append three zeros to the copied value or multiply it by a thousand.

Can I get a timestamp for a date before 1970?

Yes — earlier dates count backwards and produce a negative number. 1 January 1960, for example, comes out at roughly minus 315 million seconds. Be aware that not every database engine or language handles negative epoch values gracefully, so test what happens at the receiving end before you rely on it.

What is the year 2038 problem and does it affect my values?

On 19 January 2038 the timestamp passes 2,147,483,647, the limit of a signed 32-bit integer. Systems still storing time in that type wrap around and land in 1901. The converter itself handles such dates correctly because it uses a wider numeric type, but the system you are sending the value to may not.

Is daylight saving time taken into account?

Yes. The browser performs the conversion using the operating system's time zone database, so historical clock changes and shifting offsets are already known to it. Pick a date that falls inside a summer-time period in a zone that observes one and the extra hour is applied for you, with no manual correction.

Is the date I choose stored anywhere on a server?

No. The conversion is a handful of lines of code running in the open tab. Neither the moment you pick nor the number it produces is transmitted or written to any log, so it is safe to run internal release dates and timings taken from private tickets through it.

Examples

A range boundary in an API call
Before: 1 Jan 2021, 00:00 UTC
After: 1609459200 — goes straight into a from=... parameter
Campaign start time
Before: 15 Aug 2026, 09:30 UTC
After: 1786786200 — the value for a start_time field
Token expiry
Before: 31 Dec 2026, 23:59 UTC
After: 1798761540 — this is what goes in a JWT exp claim