c# 时间戳

private UInt32 UnixStamp()
 {
         TimeSpan ts = DateTime.Now - TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
         return Convert.ToUInt32(ts.TotalSeconds);
 }
写成函数了.

参考 XinBeta  (http://www.xinbeta.com/html/dev/dotnet/2007/0222/56.html)
posted @ 2007-02-24 17:54  y9902  阅读(3043)  评论(3编辑  收藏  举报