Asp.Net 时间戳

C#获取当前时间的时间戳,这里说的时间戳一般是指unix时间戳,也就是当前时间距离1970年1月1日 0:0:0之间的总秒数

最佳解决方案

 DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1, 0, 0, 0,0, DateTimeKind.Utc));
 double ts = (DateTime.Now- startTime).TotalSeconds;


捂着心脏说胃疼 T0 被采纳率50%
2020-09-21 15:00
打赏 0 1
页面统计
1274 访问
0 帮助
0.00 打赏

hierror 2019 © hierror.com 京ICP备13026190号-1

通知消息
  • 暂无任何消息