程序中代码如何获取时间戳?[.Net]

c#时间戳

long time=(DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
Console.WriteLine("timestamp:"+time);

验证过,正确可用。

参考:

各种语言的时间戳获取方法:https://tool.lu/timestamp/

原文地址:https://www.cnblogs.com/wangqiideal/p/12167333.html