标签:
Swift
NSDate().timeIntervalSince1970
Go
import ( "time" ) int32(time.Now().Unix())
Java
(int) (System.currentTimeMillis() / 1000)
JavaScript
Math.round(new Date() / 1000)
Objective-C
[[NSDate date] timeIntervalSince1970]
MySQL
SELECT unix_timestamp(now())
SQLite
SELECT strftime(‘%s‘, ‘now‘)
Erlang
calendar:datetime_to_gregorian_seconds(calendar:universal_time())-719528*24*3600.
PHP
time()
Python
import time
time.time()
Ruby
Time.now.to_i
Shell
date +%s
标签:
原文地址:http://www.cnblogs.com/cnsevennight/p/4255477.html