现在的Unix时间戳(Unix timestamp)是:1574411043
Unix时间戳(秒)
标准北京时间
标准北京时间
Unix时间戳(秒)
如何在不同编程语言中获取现在的Unix时间戳(Unix timestamp)?
| java | time |
| JavaScript | Math.round(new Date().getTime()/1000),getTime()返回数值的单位是毫秒 |
| Microsoft.NET | 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时间戳:Time.now 或 Time.new |
| 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()) |


