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.
Comments
Post a Comment