当前时间
2026-11-02 01:35:43
当前时间戳(秒)
1793554543
当前时间戳(毫秒)
1793554543569
时间戳 → 日期时间
日期时间 → 时间戳
时间单位换算
批量转换每行一个时间戳,自动识别秒/毫秒
编程语言获取当前时间戳
JavaScript
Math.floor(Date.now() / 1000)
Python
import time; int(time.time())
Java
System.currentTimeMillis() / 1000
PHP
time()
Go
time.Now().Unix()
C#
DateTimeOffset.UtcNow.ToUnixTimeSeconds()
Ruby
Time.now.to_i
Shell
date +%s