c#时间戳生成
private string GetTimeStamp() { TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0); return Convert.ToInt64(ts.TotalSeconds).ToString(); }
直接调用方法即可生成时间戳
转载自:https://blog.csdn.net/qq_42782011/article/details/109984421
private string GetTimeStamp() { TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0); return Convert.ToInt64(ts.TotalSeconds).ToString(); }
直接调用方法即可生成时间戳
转载自:https://blog.csdn.net/qq_42782011/article/details/109984421