Categories
NETCF

XmlSerialization of DateTime in .NETCF 2.0

Changes have been made to the DateTime type in v2.0 to help indicate whether a specific value represents a local time or universal time. What this can mean is that the behaviour of web services using DateTimes will change. This article has full details of the issue:-


http://blogs.msdn.com/mattavis/archive/2005/10/11/479782.aspx


The same approach is available under .NETCF v2.0 to request the old v1 behaviour – add a configuration file for your exe with the following content:-


<?xml version=”1.0″ encoding=”utf-8″ ?>


<configuration>


   <system.xml.serialization>


      <dateTimeSerialization mode=”Local” />


   </system.xml.serialization>


</configuration>

By Peter Foot

Microsoft Windows Development MVP