Bug 475803 - "cal.fromRFC3339 matches fails to set timezone correctly" [r=philipp]
--- a/calendar/base/modules/calProviderUtils.jsm
+++ b/calendar/base/modules/calProviderUtils.jsm
@@ -318,18 +318,18 @@ cal.fromRFC3339 = function fromRFC3339(a
if (!dateTime.isDate) {
dateTime.hour = matches[5];
dateTime.minute = matches[6];
dateTime.second = matches[7];
}
// Timezone handling
- if (matches[9] == "Z") {
- // If the dates timezone is "Z", then this is UTC, no matter
+ if (matches[9] == "Z" || matches[9] == "z") {
+ // If the dates timezone is "Z" or "z", then this is UTC, no matter
// what timezone was passed
dateTime.timezone = cal.UTC();
} else if (matches[9] == null) {
// We have no timezone info, only a date. We have no way to
// know what timezone we are in, so lets assume we are in the
// timezone of our local calendar, or whatever was passed.