.net将utc时间转换成标准时间
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时间转换成标准时间
-------------------------------------------------
保持专注,只做一件事,做好这件事!@
-------------------------------------------------

浙公网安备 33010602011771号