I mean to store strict UTC time in a DateTime variable and output it in ISO 8601 format.
To do the last I’ve used .ToString("yyyy-MM-ddTHH:mm:sszzz"), and it has uncovered that the time zone is UTC+01:00.
I’ve tried to use .Kind = DateTimeKind.Utc, but it says the Kind property has no setter.
How do I explicitly specify the time is in UTC? How is the Kind property set?
While the DateTime.Kind property does not have a setter, the static method DateTime.SpecifyKind creates a DateTime instance with a specified value for Kind.
Altenatively there are several DateTime constructor overloads that take a DateTimeKind parameter