Our application is windows desktop application. We are using VS.Net 2003, C#,
Framework 1.1, SQL 2000. We use webservices to add/update/select objects. We
are using XML Serialization. Following is a sample object at CLIENT
[System.Xml.Seri alization.XmlAt tributeAttribut e()]
public System.DateTime ContactDateTime
{
get { return _ContactDateTim e; }
set { _ContactDateTim e = value; }
}
Following is the object at SERVER
[XmlAttribute]
public DateTime ContactDateTime
{
get {return _contactDateTim e;}
set {_contactDateTi me = value;}
}
The problem is that when the client/server is in a timezone where
dayLightSavings are ON. The DateTime field contains a value adjusted to one
hour during Daylight saving period, which results in incorrect data. For ex:
if the value in the database is "12/03/2005 23:00:00" when it is serialized
and received at DLS client the date becomes "13/03/2005 00:00:00" same is the
case when dates are serialized from client to server.
How this problem can be resolved?
Framework 1.1, SQL 2000. We use webservices to add/update/select objects. We
are using XML Serialization. Following is a sample object at CLIENT
[System.Xml.Seri alization.XmlAt tributeAttribut e()]
public System.DateTime ContactDateTime
{
get { return _ContactDateTim e; }
set { _ContactDateTim e = value; }
}
Following is the object at SERVER
[XmlAttribute]
public DateTime ContactDateTime
{
get {return _contactDateTim e;}
set {_contactDateTi me = value;}
}
The problem is that when the client/server is in a timezone where
dayLightSavings are ON. The DateTime field contains a value adjusted to one
hour during Daylight saving period, which results in incorrect data. For ex:
if the value in the database is "12/03/2005 23:00:00" when it is serialized
and received at DLS client the date becomes "13/03/2005 00:00:00" same is the
case when dates are serialized from client to server.
How this problem can be resolved?
Comment