If I create JSON data on server in this format:
and have my data record specified with type 'date' and dateFormat:
then the output is blank.
If I create JSON data on server in this format:
and have my data record specified with type 'date' and dateFormat:
then the output is shown but in wrong timezone.
2007-03-02T15:00:00+01:00
Y-m-d\\TH:i:sO
If I create JSON data on server in this format:
2007-03-02T15:00:00
Y-m-d\\TH:i:s

|
#2
|
|
Eliminating the complexity of the grid and default renderers, can you confirm this behavior when using the Extified Date object by itself?
![]() |
|
#3
|
var date = Date.parseDate('2007-03-02T15:00:00+01:00', 'Y-m-d\\TH:i:sO');
var date = Date.parseDate('2007-03-02 15:00:00+01:00', 'Y-m-d H:i:sO');
var date = Date.parseDate('2007-03-02 15:00:00', 'Y-m-d H:i:s');
alert(date);
var date = Date.parseDate('2007-03-02 15:00:00', 'Y-m-d H:i:s');
alert(date.getGMTOffset());
Doesn't it look weird? ![]() |
|
#4
|
|
var date = Date.parseDate('2007-03-02T15:00:00+01:00', 'Y-m-d\\TH:i
O');You have a colon in your timezone info which is not supported. It should be: 2007-03-02T15:00:00+0100 I can look at adding support for it (since I think that's how ISO does it?). Would it be easier for you to remove the colon? ![]() |
|
#5
|
|
Sure I can remove the colon; I just read some ISO 8601 docs and what I did with the colon is the 'extended' format, where the 'basic' format does not have a colon. This doesn't bother me for now...
However... It now outputs the dates... except that if my server-generated date/time is: "2006-09-09T22:56:08+0100" then it says "Sat Sep 09 2006 22:56:08 GMT+0200" in the grid. Notice the timezone! ![]() |
|
#6
|
|
I will do some digging.
![]() |
|
#7
|
|
Jack I just tried to output this date/time on my server to two different fields:
"2006-09-09T22:56:08+0100" and when renderen in the columns it shows: "Sat Sep 09 2006 22:56:08 GMT+0200" "Sat Sep 09 2006 22:56:08 GMT+0100" in the grid. Notice the timezone! This is the case for all records down the grid... +0200 in the first column and +0100 in the second. ![]() |
本文讨论了在使用Ext.js框架中的Extified Date对象解析特定格式的JSON日期时遇到的问题,包括不同日期格式对解析结果的影响及时间区处理的不一致性。
O');
677

被折叠的 条评论
为什么被折叠?



