c# 获取时间戳

天道酬勤!!! / 2023-08-21 / 原文

var unixTimestamp = (long)DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalSeconds;