最近在研究Grails+ExtJS做应用。Grails render到前台的Date格式默认是ExtJS的'Y-m-dTH:m:sZ'格式, 但ExtJS却不认'2010-01-14T04:37:11Z'。Google了一下,找到一篇文章
引自“http://www.timeanddate.com/library/abbreviations/timezones/military/z.html”:
Military time zones:
Z – Zulu Time Zone
Time zone offset: UTC
Z is in the same time zone as Coordinated Universal Time (UTC)Time zone abbreviation: Z
Full name is Zulu Time ZoneEmail time zone indicator: +0000
An email sent from someone in the Z time zone will have the time zone listed as "+0000" in the headers of the email. (However, "+0000" does not have to be in Z, as other time zones could have the same UTC offset).
Other time zones in Military...
原来Z代表Zulu啊。试试把'Z'换成'+0000'
Date.parseDate = function(input, format, strict) {input = input.replace(/Z$/, '+0000');/*...*/}
搞掂。