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

it2022-05-05  101

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

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

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

 

转载于:https://www.cnblogs.com/Believe/archive/2010/02/11/1667522.html


最新回复(0)