C# 时间与时间戳互转 13位
原文: C# 时间与时间戳互转 13位 /// <summary> /// 获取时间戳 /// </summary> /// <returns></returns> public static string GetTimeStamp(System.DateTime time) { long ts = ConvertDateTimeToInt(time); return ts.ToString(); } /// <summary> /// 将c# DateTime时间格式转换为Unix时间戳格式 /// </summary> /// <param name="time">时间</param> /// <returns>long</returns> public static long ConvertDateTimeToInt(System.DateTime time) { System.DateTime startTime = TimeZone.CurrentTimeZ...