开发者

TimeZone.CurrentTimeZone in an ASP.NET app

How does TimeZone.CurrentTimeZone work if run in an ASP.NET app? Does it return the timezone of the application pool running the application? If using impersonation, does it return the timezo开发者_Go百科ne of the user its impersonating?


It is the time zone on the computer where the code is executing. This is stored in HKLM i.e. it is a machine level setting not a user level. So it doesn't matter if impersonaltion is used. The value would still be the same. Check TimeZone.CurrentTimeZone which is TimeZoneInfo.Local

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜