datetime - JSON.net deserialize date with javascript -


when serialize date using json.net date formatted as:

'2015-07-07t17:27:00.057' 

once receive object ajax comes string not date. how can convert '2015-07-07t17:27:00.057' javascript date.

i have tried

 new date('2015-07-07t17:27:00.057') gives incorrect date 

edit:

found problem. if serialize datetime.now wrong date. if serialize datetime.utcnow correct date when deserializing. need save dates in coordinated universal time (utc). comments solution, much.

json.net supports multiple ways of formatting date, if consuming ajax call may want javascriptdatetimeconverter.

http://www.newtonsoft.com/json/help/html/datesinjson.htm


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -