c# 时间戳转换为Datetime类型的时间

private static DateTime GetConvertTime(long ltime)
{
   DateTime dt_time=new DateTime(1970,1,1,8,0,0,0);
   long time_1970=dt_time.Ticks;  
   long time_tick=time_1970+ltime*TimeSpan.TicksPerSecond;
   DateTime dt=new DateTime(time_tick);
   return dt;
}

  

posted @ 2014-01-09 18:06  Aiolos丶M  阅读(294)  评论(0编辑  收藏  举报