Home All Groups Group Topic Archive Search About

DateTime not serialized as ISO8601 if initialized from MySQL datetime

Author
28 Jan 2006 1:29 AM
rlaemmler
Hi,

I just migrated my web app to .NET 2.0. Part of the app creates some
objects which are returned by a web service. The objects are
initialized from a MySQL query which some contain datetime properties.
Using .NET 1.1 soap
serialized a DateTime always in the ISO8601 format. e.g.
"2006-01-27T07:42:11.3014976-08:00". Now using .NET 2.0 suddenly the
DateTime objects instanciated from a MySQL result set get serialized as

"2006-01-26T18:40:56". Only DateTime objects instanciated from code
e.g. DateTime.Now get fully serialized in the ISO8601 format.

Does anybody know why this happens and how to make sure the Soap
serializer always uses ISO8601?


Thanks for your help!

AddThis Social Bookmark Button