I am consuming an XML webservice with XSD elements such as:
<xs:element nillable="true" type="xs:dateTime" name="ENDDATE"/>
XML might look like the following:
<ENDDATE>2016-08-01T18:35:49+04:00</ENDDATE>
I used XSD.exe to autogenerate C# classes, when I inspect these the DateTime
object will contain the time in system-local time, with Kind==Local
.
Is there a way I can force the DateTime instances to be in UTC time without manually hacking the auto-generated classes for every such field (there are rather a lot)?