public DateTime UTCToDateTime(Int64 utc)
{
   DateTime dtZone = new DateTime(1970, 1, 1, 0, 0, 0);
   dtZone = dtZone.AddSeconds(utc);
   return dtZone.ToLocalTime();
}
MessageBox.Show(UTCToDateTime (1294675200).ToString());
//得到2011-1-11 00:00:00

此方法摘自互联网,望作者莫怪,时间太久了,不记得从哪里找来的代码了,抱歉了。

 

.net将utc时间转换成标准时间

相关文章:

  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
相关资源
相似解决方案