Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是一个非常简单的问题,但我什么也没找到。
我想以秒为单位获得当前的 unix 时间戳,我想获得与 PHPtime()函数相同的结果。
time()
System.Now返回当前时间的完整日期。
System.Now
如何在 vb.net 中实现这一点?
我相信这会做到:
Public Shared Function GetUnixTimestamp () As Double Return (DateTime.Now - new DateTime (1970, 1, 1, 0, 0, 0, 0)).TotalSeconds End Function