1、C#时间转js时间
/// <summary> /// C#时间转js时间 /// </summary> /// <param name="theDate"></param> /// <returns></returns> private static long MilliTimeStamp(DateTime theDate) { var d1 = new DateTime(1970, 1, 1); var d2 = theDate.ToUniversalTime(); var ts = new TimeSpan(d2.Ticks - d1.Ticks); return (long)ts.TotalMilliseconds; }