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时间转换成标准时间