我正在获取一个含有DateTime类型列的datatable中的值。
之后,我使用Json.Net
进行序列化。
jsonData = JsonConvert.SerializeObject(datatable);
数据表中的日期是:2013-04-03 04:01:24.623
,
在序列化后存储在jsonData
中的格式为:2013-04-03T04:01:24.623
在我的页面上,我将其用作:
timeStamp = new Date(jsonRow.TimeStamp).toLocaleString(); // Here jsonRow.TimeStamp is extracted from the received json response.
在Safari浏览器中,出现错误:
Invalid Date
。