I make an ajax call with jQuery 1.4.2 with dataType: 'json'.
$.ajax({
url: url_with_json_formated_response,
data: jsonOptions,
dataType: 'json',
error: function(XMLHttpRequest, textStatus, errorThrown){
alert('unable to get data, error:' + textStatus);
},
success: function(data) {
console.log(data);
});
If I look at the xhr response I get the following.
{"events":[{"start":"2010-10-25T10:00:00-07:00","label_color":"","kind":"availability","end":"2010-10-25T20:00:00-07:00","recurrence":"monday","body":"some body text","title":"some title text","id":"1492"}]}
BUT, the json object that jquery formats for me (console.log(data),has wrong date objects that are close to the year 1970, like Thu Jan 01 1970 23:00:00 GMT+0200 (EET) (pasted form chrome's console)
I suppose there is something wrong with the jSON parsing that create Date objects for me. Any clue?