Asp.net中取得本地和UTC时间的时差

int offset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).Hours;

offset>0 :当前时区是“+offset”

offset<0 :当前时区是“-offset”

 

posted @ 2010-02-11 14:38  天涯浪迹  阅读(357)  评论(0)    收藏  举报