正在加载,请稍候…

Unix Timestamp Converter

Convert Unix timestamps to human-readable dates and vice versa. Shows current timestamp, ISO 8601, UTC, and local time formats.

How to Use

  1. Step 1: To convert a timestamp to a date, paste the Unix timestamp in the input field.
  2. Step 2: Toggle "In milliseconds" if your timestamp is in ms (13 digits) rather than seconds (10 digits).
  3. Step 3: To convert a date to a timestamp, enter a date string in the bottom section.

Frequently Asked Questions

What is a Unix timestamp?

A Unix timestamp counts the number of seconds (or milliseconds) elapsed since January 1, 1970 00:00:00 UTC (the Unix Epoch). It is timezone-independent and widely used in programming.

How do I check if my timestamp is in seconds or milliseconds?

A 10-digit number is seconds (e.g. 1704067200). A 13-digit number is milliseconds (e.g. 1704067200000). Current Unix time is ~1.7 billion seconds.

How do I get the current Unix timestamp in different languages?

JavaScript: Date.now() (ms) or Math.floor(Date.now()/1000) (seconds); Python: import time; int(time.time()); Java: System.currentTimeMillis()/1000; Go: time.Now().Unix(); Shell: date +%s. Most languages return seconds; JavaScript returns milliseconds.

What is the Year 2038 problem with Unix timestamps?

The Y2K38 problem: a signed 32-bit integer's maximum value is 2,147,483,647, corresponding to 2038-01-19 03:14:07 UTC. Beyond that moment, the 32-bit integer overflows to a negative value, causing systems to interpret the time as 1901. Solutions: use 64-bit integers to store timestamps (Linux kernel 5.6+ supports 64-bit time_t on 32-bit systems); upgrade legacy systems and embedded devices using 32-bit timestamps; check database TIMESTAMP field types.