Java | time |
JavaScript | Math.round(new Date().getTime()/1000) getTime()返回?cái)?shù)值的單位是毫秒 |
Microsoft .NET / C# | epoch = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000 |
MySQL | SELECT unix_timestamp(now()) |
Perl | time |
PHP | time() |
PostgreSQL | SELECT extract(epoch FROM now()) |
Python | 先?import time?然后?time.time() |
Ruby | 獲取Unix時(shí)間戳:Time.now?或?Time.new 顯示Unix時(shí)間戳:Time.now.to_i |
SQL Server | SELECT DATEDIFF(s, '1970-01-01 00:00:00', GETUTCDATE()) |
Unix / Linux | date +%s |
VBScript / ASP | DateDiff("s", "01/01/1970 00:00:00", Now()) |
其他操作系統(tǒng) (如果Perl被安裝在系統(tǒng)中) |
命令行狀態(tài):perl -e "print time" |
Copyright @ 我愛學(xué)習(xí)網(wǎng) © 2008-2013 5axxw Inc.
法律聲明 違版必究 資料版權(quán) 作者所有