Anuja
Anuja

Reputation: 1

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)

Upvotes: 0

Views: 183

Answers (2)

V4Vendetta
V4Vendetta

Reputation: 38200

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

Upvotes: 2

macleojw
macleojw

Reputation: 4159

I believe you are looking for DateTime.ToLocalTime

Upvotes: 2

Related Questions