时间戳(Unix timestamp)

时间戳
时间

主流编程语言获取时间戳

Goint32(time.Now().Unix())
Java// pure java
(int) (System.currentTimeMillis() / 1000)
// joda
(int) (DateTime.now().getMillis() / 1000)
JavaScripteMath.round(new Date() / 1000)
SwiftNSDate().timeIntervalSince1970
Objective-C[[NSDate date] timeIntervalSince1970]
MySQLSELECT unix_timestamp(now())
SQLiteSELECT strftime('%s', 'now')
Erlangcalendar:datetime_to_gregorian_seconds(calendar:universal_time())-719528*24*3600.
PHP// pure php
time()
// Carbon\Carbon
Carbon::now()->timestamp
Pythontime.time()
RubyTime.now.to_i
Shelldate +%s
Groovy(new Date().time / 1000).intValue()
Luaos.time()
.NET/C#(DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000