Recommended use: Chrome, Firefox, or Microsoft Edge

时间戳转换 时间戳转换

在线Timestamp转换

状态:正常
1656275846720
毫秒(ms)
毫秒(ms)
不同语言获取当前时间戳
JavaScript+ new Date() (毫秒)
new Date().getTime() (毫秒)
Date.now() (毫秒)
Math.floor(new Date().getTime() / 1000) (秒)
Math.floor(Date.now() / 1000) (秒)
JavaSystem.currentTimeMillis() / 1000 [ 最快 ]
new Date().getTime() / 1000
Calendar.getInstance().getTimeInMillis() / 1000
PHPtime()
Pythonimport time
time.time()
Microsoft .NET / C#epoch = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000
MySQLSELECT unix_timestamp(now())
Perltime
PostgreSQLSELECT extract(epoch FROM now())
RubyTime.now // 获取Unix时间戳
Time.new // 获取Unix时间戳
Time.now.to_i // 显示Unix时间戳
SQL ServerSELECT DATEDIFF(s, '1970-01-01 00:00:00', GETUTCDATE())
Unix / Linuxdate +%s
VBScript / ASPDateDiff("s", "01/01/1970 00:00:00", Now())
SwiftNSDate().timeIntervalSince1970
Goimport (
"time"
)
int32(time.Now().Unix())