如何在不同编程语言中获取现在的Unix时间戳(Unix timestamp)?
Java
time
JavaScript
Math.round(new Date().getTime()/1000)
getTime()返回数值的单位是毫秒
Microsoft .NET / C#
epoch = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000
MyS
转载
2012-11-09 16:04:56 ·
1447 阅读 ·
0 评论