I have a UTC timestamp created with the DateTime class.
var time = DateTime.UtcNow;
When I format it I get the following result:
time.ToString("yyyy-MM-ddTHH:mm:sszzz")
> 2019-02-03T10:08:40+00:00
Which is correct but I want it to be formatted in the local timezone like this:
2019-02-03T11:08:40+01:00
< note the +01:00
How can I get this?
I could use DateTime.Local in this example but the timestamp is actually coming from another system/module and so the solution has to work on something like DateTime.UtcNow