1 ///2 /// 时间戳转换成标准时间 3 /// 4 /// 时间戳 5 ///6 private DateTime ConvertToTime(string timeStamp) 7 { 8 DateTime time = DateTime.Now; 9 if (string.IsNullOrEmpty(timeStamp))10 {11 return time;12 }13 try14 {15 DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));16 long lTime = long.Parse(timeStamp + "0000");17 TimeSpan toNow = new TimeSpan(lTime);18 time = dtStart.Add(toNow);19 }20 catch (Exception ex)21 {22 log.Warn(ex.Message); 23 }24 return time;25 }