获取当前时间戳
Go
import "time"
int32(time.Now().Unix())
Java
// pure java
(int) (System.currentTimeMillis() / 1000)
// joda
(int) (DateTime.now().getMillis() / 1000)
JavaScript
Math.round(new Date() / 1000)
MySQL
SELECT unix_timestamp(now())
SQLite
SELECT strftime('%s', 'now')
PHP
// pure php
time()
// Carbon\Carbon
Carbon::now()->timestamp
Python
import time
time.time()
Shell
date +%s
Lua
os.time()