I have a problem with the Ext Date class, apparently returning the wrong time zone for the parsed date. Using the following code, I create a date object for May 24, 1966 15:46 BST:
date = "1966-05-24T15:46:01+0100";
var pDate = Date.parseDate(date, "Y-m-d\\TH:i:sO", false);
Then I call this:
console.log(pDate.getGMTOffset());
I expect to get the offset associated with the orignal date (GMT + 1), but instead I get the local time zone of the browser. If the browser is set to a time zone far enough from GMT, the daytime part of the date will also be upside down (so that the date will now appear on May 25, 1966).
Does anyone know how to get around this and make Ext recognize the correct time point of the syntax date, not the local time zone of the browser?
If this is not possible, can Ext force GMT instead of trying to interpret time intervals?
source
share