C# gettime实现

TimeSpan ts=new TimeSpan(spa

 System.DateTime.UtcNow.Ticks - new DateTime(197011000).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

相关文章
相关标签/搜索