Run this jsfiddle: http://jsfiddle.net/E9gq9/7/ on Chrome, FF, and IE and you get:
Chrome:
Chrome http://images.devs-on.net/Image/vBTz86J0f4o8zlL3-Region.png
David Hammond's answer is great but doesn't play all the tricks; so here is a modified version:
appendTimezone = function (/*String*/ d) {
// check for ISO 8601 date-time string (seconds and fractional part are optional)
if (d.search(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d{1-3})?)?$/) == 0) {
var pad = function (num) {
norm = Math.abs(Math.floor(num));
return (norm < 10 ? '0' : '') + norm;
},
tzo = -new Date(d).getTimezoneOffset(),
sign = tzo >= 0 ? '+' : '-';
var adjusted = d + sign + pad(tzo / 60) + ':' + pad(tzo % 60);
// check whether timezone offsets are equal;
// if not then the specified date is just within the hour when the clock
// has been turned forward or back
if (-new Date(adjusted).getTimezoneOffset() != tzo) {
// re-adjust
tzo -= 60;
adjusted = d + sign + pad(tzo / 60) + ':' + pad(tzo % 60);
}
return adjusted;
} else {
return d;
}
}
parseDate = function (/*String*/ d) {
return new Date(appendTimezone(d));
}