This project has moved and is read-only. For the latest updates, please go here.

Date Conversions?

Sep 30, 2008 at 9:15 PM

I am pretty new to and don't do too much with it other than use the  JavaScriptConvert.SerializeObject(myBizObject) method call.  I am having a problem with a date conversion.  I have the date sitting in a DateTime property of my business object with a value of {9/30/2008 12:00:00 AM}.  After the above serialization call the JSON object has the following property: OrderDate :new Date(1222732800000), which in turn translates to the following on the client after decoded "Mon Sep 29 20:00:00 EDT 2008".

What is going on here?  How can 9/30/2008 translate to 9/29/08 under any circumstance?

Thanks for the help.

Sep 30, 2008 at 11:43 PM
I'm getting confused with the versions available and which one to use.  I am using .Net 2.0...what is the latest version of that I can use?

Trying to get better date conversion handling that what is in 1.3.1, and all the references I see on how to fix it (JavascriptDateTimeConverter) seem like they are only available in the 2.0 release and up...which requires a framework upgrade and I'm not sure that I can do that for this client.

Thanks for any help,
Oct 1, 2008 at 7:54 PM
I have since upgraded the project to JSON.Net 3.0 and used the new JavascriptDataTimeConverter attribute on the .Net object and this fixed the problem.  thanks!  Not sure what people will do when they do not have the luxury of upgrading the framwork though :)