WCF - Store and restore UTC DateTime
WCF - Store and restore UTC DateTime We expose to our customer a WCF webservice allowing them to store DateTime in SQL Server databases. Extract of the WSDL : <xs:complexType name="TimePeriod"> <xs:sequence> <xs:element minOccurs="0" name="endDateTime" nillable="true" type="xs:dateTime"/> <xs:element minOccurs="0" name="startDateTime" nillable="true" type="xs:dateTime"/> </xs:sequence> For exemple, my customer send me UTC Datetime : <af:effectivePeriod> <af:startDateTime>2018-01-16T10:32:28Z</af:startDateTime> </af:effectivePeriod> This is stored in a SQL Server database in a datetime field. datetime But in the output of the read service, I don't have the UTC indicator : <af:effectivePeriod> <af:startDateTime>2018-01-16T10:32:28</af:startDateTime> </af:effectivePeriod> "Z" is kind of a unique...