XmlSerializer.Deserialize method appends timezone to a time and datetime field
- by G33kKahuna
Have a small script in Microsoft.NET 2.0 that deserializes a XML back to a typed object, connects dyanimcally to a web service using ServiceDescription and binds the deserialized typed object to the WebMethod inbound. The XML prior to serialization looks like below
<completion_time>12:19:38</completion_time>
on the wire when communicating to the web service looks like below
<completion_time>12:19:38.0000000-04:00</completion_time>
with the timezone appended to the end. This is causing the time to be read differently when communicating to a web service at a different timezone. is there anyway to let XmlSerializer skip the timezone? Or any other known workarounds?