开发者

UTCDate in EventLog? Convert to correct locale

开发者 https://www.devze.com 2023-02-28 21:12 出处:网络
I am reading windows eventlog using WMI and just noticed recently that time is lagging behind, if I convert cim datetime to .NET.It seems that datetime is encoded as UTC.There should be straighforward

I am reading windows eventlog using WMI and just noticed recently that time is lagging behind, if I convert cim datetime to .NET. It seems that datetime is encoded as UTC. There should be straighforward 开发者_开发百科conversion in .NET, isn't it?


You might try date.ToLocalTime() to convert an UTC date/time to local date/time.

0

精彩评论

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