Timestamp Converter
Convert between Unix timestamps and dates
Timestamp actual
1791052717
Timestamp → Fecha
Fecha → Timestamp
Online Unix Timestamp to Date Converter - Epoch Time
What is a Unix timestamp (epoch time) and how does it work?
A Unix timestamp, also known as epoch time, POSIX time or Unix time, represents a date and time as a single integer: the number of seconds elapsed since 1 January 1970 at 00:00:00 UTC, known as the Unix epoch. The format is used universally in programming because it is completely independent of time zones (it is always UTC), it is easy to store as a plain integer, it makes comparisons and time difference calculations trivial, and it is portable across any operating system, programming language and database.
How do different programming languages handle timestamps?
Each language has its own conventions. JavaScript works in milliseconds, since Date.now() returns milliseconds since the epoch, which is a frequent source of confusion with other systems. Python offers time.time(), returning seconds with a fractional part for microsecond precision. PHP uses time() for whole seconds and microtime() for microseconds. Java and Kotlin use System.currentTimeMillis() (milliseconds) or Instant.now(). On the database side, MySQL has UNIX_TIMESTAMP() and FROM_UNIXTIME(), while PostgreSQL offers EXTRACT(EPOCH FROM timestamp). This tool detects automatically whether your timestamp is in seconds or milliseconds and converts accordingly.
How do you handle time zones correctly with timestamps?
Unix timestamps are always UTC by definition, which removes time zone ambiguity from storage and transmission. The golden rule is to always store in UTC (a timestamp or a UTC datetime), always transmit in UTC (APIs should use ISO 8601 with Z or +00:00), and convert to a local time zone only when displaying to the end user. Avoid storing local time, because daylight saving transitions will corrupt your data. This tool shows the conversion both in your browser local time and in UTC for a clear reference.
If you work with this tool, you will probably also find these useful Number Base Converter, UUID Generator, Password Generator, Lorem Ipsum Generator.
Frequently asked questions
What is the year 2038 problem (Y2K38) and does it affect me?
32-bit systems store timestamps as signed 32-bit integers with a maximum value of 2,147,483,647. That number corresponds to 19 January 2038 at 03:14:07 UTC, the moment the counter overflows and wraps around, producing wrong dates or crashes. Modern systems have used 64-bit integers since around 2010, extending the range to 292 billion years. If you build for embedded systems, IoT devices or legacy 32-bit platforms, verify that you use 64-bit timestamps. For modern web systems it is generally not a concern.
Why does my timestamp have 13 digits instead of 10?
A 10-digit timestamp represents seconds since the Unix epoch, the traditional format. A 13-digit timestamp represents milliseconds, the JavaScript format used by many modern APIs. The difference is a factor of 1000. For example, 1704067200 (10 digits, seconds) equals 1704067200000 (13 digits, milliseconds), which is 1 January 2024 00:00:00 UTC. This tool detects the format from the digit count and converts accordingly, with no manual selection needed.
How do I get the current timestamp in JavaScript?
JavaScript works natively in milliseconds. For the current timestamp, Date.now() returns milliseconds and Math.floor(Date.now() / 1000) returns seconds. For a specific date, new Date("2024-01-15T12:00:00Z").getTime() returns milliseconds, so divide by 1000 for seconds. To build a Date from a timestamp, use new Date(millisecondsTimestamp) or new Date(secondsTimestamp * 1000). Always be explicit about whether you are handling seconds or milliseconds, because that is where the subtle bugs live.