namespace ClientCore.Common { public static class Helper { public static long GetNowTimeStamp() { return GetTimeStamp(DateTime.Now); } /// /// 获取时间戳 /// /// public static long GetTimeStamp(DateTime dt) { TimeSpan ts = dt - new DateTime(1970, 1, 1, 0, 0, 0, 0); return Convert.ToInt64(ts.TotalSeconds); } } }