获取当前时间戳 SwiftNSDate().timeIntervalSince1970Goimport ( "time" ) int32(time.Now().Unix())Java// pure java (int) (System.currentTimeMillis() / 1000)// joda (int) (DateTime.now().getMillis() / 1000)JavaScriptMath.round(new Date() / 1000)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()->timestampPythonimport time time.time()RubyTime.now.to_iShelldate +%sGroovy(new Date().time / 1000).intValue()Luaos.time().NET/C#(DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000