在线时间戳转换工具,Unix 时间戳与日期时间互转
时间戳是什么?
时间戳(Unix Timestamp)是指从1970年1月1日00:00:00 UTC到指定时间所经过的秒数或毫秒数。
时间戳类型:
时间戳是指格林威治时间1970年01月01日00时00分00秒(北京时间1970年01月01日08时00分00秒)起至现在的总秒数。
| 时间单位 | 秒数 |
|---|---|
| 1 hour | 3,600 |
| 1 day | 86,400 |
| 1 week | 604,800 |
| 1 month (30.44 days) | 2,629,743 |
| 1 year (365.24 days) | 31,556,926 |
time()time.time()Time.now.to_itimeSystem.currentTimeMillis()/1000(DateTime.UtcNow - new DateTime(1970,1,1)).TotalSecondstime.Now().Unix()Math.floor(Date.now()/1000)as.numeric(Sys.time())date +%sdate('Y-m-d H:i:s', $epoch)datetime.utcfromtimestamp(epoch)Time.at(epoch)new Date(epoch*1000)time.Unix(epoch, 0)new Date(epoch*1000)FROM_UNIXTIME(epoch)to_timestamp(epoch)datetime(epoch, 'unixepoch')date -d @epochstrtotime('2024-01-01')calendar.timegm(d.timetuple())Time.new(y,m,d).to_idate.getTime()/1000time.Date(...).Unix()Math.floor(Date.parse(d)/1000)UNIX_TIMESTAMP('2024-01-01')extract(epoch FROM d::timestamp)strftime('%s', d)date -d "2024-01-01" +%sOnline timestamp conversion tool
Runs locally · Nothing uploaded
A professional Unix timestamp converter that supports bidirectional conversion between timestamps and date/time values. It offers ISO 8601, RFC 2822, custom format outputs, and batch conversion capabilities to help developers quickly process time data.
Yes. The tool automatically detects timestamp precision and correctly converts both 10-digit (seconds) and 13-digit (milliseconds) timestamps.
Absolutely. You can paste multiple timestamp entries (one per line) and the tool will convert them all in one batch, significantly improving efficiency.
Click the "Get Current Timestamp" button to instantly retrieve both second-level and millisecond-level timestamps for the current time.