开发者

How to change the UTC Time

I have developed my application in c#. In this application OPC 开发者_运维知识库Server returns the UTC Time automatically. But the issue is I want to change this UTC Time same as System Time. (The difference between System Time & UTC Time is 5.30)


I believe you are looking for DateTime.ToLocalTime


First check if the Kind property is DateTimeKind.Utc then toLocalTime() would be enough else you will have to use AddHours and AddMinutes

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜