TimeSpan ts=new TimeSpan(spa
System.DateTime.UtcNow.Ticks - new DateTime(1970, 1, 1, 0, 0, 0).Ticks); class
(long)ts.TotalMilliseconds; im
或者:word
long timeSpan = (long)Math.Abs(DateTime.Now.Ticks - DateTime.Parse("1970-1-1").Ticks);
timeSpan = timeSpan / TimeSpan.TicksPerMillisecond;
timeSpan = timeSpan-28800000;//減去8小時時區差
return timeSpan;co