Unix 时间戳转换工具

时间戳与日期互转,支持秒和毫秒级。实时双向转换,输入即可看到结果。

转换结果
时间戳(秒):
时间戳(毫秒):
日期(ISO):
日期(本地):
相对时间:
广告位 — Google AdSense

Unix Timestamp Converter — Seconds / Milliseconds Online

工具介绍

A Unix timestamp counts seconds (or milliseconds) since 1970-01-01 00:00:00 UTC. It is the lingua franca of databases, logs, APIs, and cron jobs. This tool converts between seconds/milliseconds and human-readable dates, showing UTC, your local timezone, weekday, and ISO 8601 string.

怎么使用

  1. Pick direction: timestamp → date, or date → timestamp
  2. Enter the timestamp (auto-detects 10-digit sec / 13-digit ms) or pick a date
  3. Output shows UTC and your local timezone; copy with one click

常见用例

常见问题

Q: 10 or 13 digits?
A: 10 = seconds (covers 1970-2038). 13 = milliseconds (JS Date.now()). The tool auto-detects.

Q: Wrong time displayed?
A: Check timezone. We use your browser locale; China is UTC+8.

Q: 2038 problem?
A: 32-bit signed second timestamps overflow on 2038-01-19. Modern systems use 64-bit.

小贴士

MySQL: UNIX_TIMESTAMP() returns seconds, FROM_UNIXTIME() reverses.

JS: Math.floor(Date.now()/1000) for seconds; new Date(ts*1000) for Date.

Python: time.time() returns float seconds; datetime.fromtimestamp(ts, tz) reverses.