- 注册时间
- 2012-8-10
- 最后登录
- 2013-3-25
- 阅读权限
- 10
- 积分
- 172
- 精华
- 0
- 帖子
- 32
|
通过$.post获取数据,结果时间字段被格式化成指定的时间“1901-1-1”
具体如下:
$.post($.gl, dat, function (txt) {
//.........
});
后台传回数据如下:{
"A1": "CC3",
"A2": 8287,
"A3": "1911-11-11 00:00:00",
"A4": "111111111111111",
"A5": "2012-09-06 00:00:00",
"A6": null,
"A7": null,
"A8": null,
"A9": null,
"A10": 2,
"A11": null,
"A12": null,
"A13": "",
"A14": null,
"A15": null,
"A16": null,
"A17": null,
"A18": null,
"A19": "0001-01-01 08:00:00",
"A20": "0001-01-01 08:00:00",
}
通过mini.encode(txt)看到的数据却变成了如下:
{
"A1": "CC3",
"A2": 8287,
"A3": "1911-11-11 00:00:00",
"A4": "111111111111111",
"A5": "2012-09-06 00:00:00",
"A6": null,
"A7": null,
"A8": null,
"A9": null,
"A10": 2,
"A11": null,
"A12": null,
"A13": "",
"A14": null,
"A15": null,
"A16": null,
"A17": null,
"A18": null,
"A19": "1901-01-01T08:00:00",
"A20": "1901-01-01T08:00:00",
}
这两个值由"A19": "0001-01-01 08:00:00", "A20": "0001-01-01 08:00:00",变成了 "A19": "1901-01-01T08:00:00", "A20": "1901-01-01T08:00:00",求解
|
|