Commit 213ed52b authored by Ludovic LANGE's avatar Ludovic LANGE
parent db0d0fef
......@@ -109,7 +109,7 @@ exchTaskDelegation.prototype = {
let dtFormat = Cc["@mozilla.org/calendar/datetime-formatter;1"]
.getService(Ci.calIDateTimeFormatter);
var tmpDate = cal.fromRFC3339(task.getProperty("exchWebService-PidLidTaskLastUpdate"), this.globalFunctions.ecTZService().UTC).getInTimezone(this.globalFunctions.ecDefaultTimeZone());
var tmpDate = cal.dtz.fromRFC3339(task.getProperty("exchWebService-PidLidTaskLastUpdate"), this.globalFunctions.ecTZService().UTC).getInTimezone(this.globalFunctions.ecDefaultTimeZone());
var lastChange = task.getProperty("exchWebService-PidLidTaskHistory");
switch (lastChange) {
......
......@@ -191,7 +191,7 @@ erFindCalendarItemsRequest.prototype = {
if (xml2json.getTagValue(calItem, "t:Start").substr(0, 10) == xml2json.getTagValue(calItem, "t:End").substr(0, 10)) {
var tmpDateStr = xml2json.getTagValue(calItem, "t:End");
var tmpDateObj = cal.fromRFC3339(tmpDateStr, exchWebService.commonFunctions.ecTZService().UTC).getInTimezone(exchWebService.commonFunctions.ecDefaultTimeZone());
var tmpDateObj = cal.dtz.fromRFC3339(tmpDateStr, exchWebService.commonFunctions.ecTZService().UTC).getInTimezone(exchWebService.commonFunctions.ecDefaultTimeZone());
var offset = cal.createDuration();
offset.seconds = 1;
tmpDateObj.addDuration(offset);
......
......@@ -194,8 +194,8 @@ erFindOccurrencesRequest.prototype = {
var tmpItems = xml2json.XPath(e, "/m:Items/*");
for each(var tmpItem in tmpItems) {
this.currentRealIndex++;
var startDate = cal.fromRFC3339(xml2json.getTagValue(tmpItem, "t:Start"), cal.dtz.UTC).getInTimezone(cal.dtz.UTC);
var endDate = cal.fromRFC3339(xml2json.getTagValue(tmpItem, "t:End"), cal.dtz.UTC).getInTimezone(cal.dtz.UTC);
var startDate = cal.dtz.fromRFC3339(xml2json.getTagValue(tmpItem, "t:Start"), cal.dtz.UTC).getInTimezone(cal.dtz.UTC);
var endDate = cal.dtz.fromRFC3339(xml2json.getTagValue(tmpItem, "t:End"), cal.dtz.UTC).getInTimezone(cal.dtz.UTC);
if ((this.startDate.compare(endDate) < 1)
&& (this.endDate.compare(startDate) > -1)) {
// We found our occurrence
......
......@@ -4164,20 +4164,20 @@ calExchangeCalendar.prototype = {
var start = null;
if (xml2json.getTagValue(aCi, "t:StartTime", null)) {
if (this.isVersion2007) {
start = cal.fromRFC3339(xml2json.getTagValue(aCi, "t:StartTime", null), this.globalFunctions.ecUTC());
start = cal.dtz.fromRFC3339(xml2json.getTagValue(aCi, "t:StartTime", null), this.globalFunctions.ecUTC());
}
else {
start = cal.fromRFC3339(xml2json.getTagValue(aCi, "t:StartTime", null), this.globalFunctions.ecDefaultTimeZone());
start = cal.dtz.fromRFC3339(xml2json.getTagValue(aCi, "t:StartTime", null), this.globalFunctions.ecDefaultTimeZone());
}
}
var end = null;
if (xml2json.getTagValue(aCi, "t:EndTime", null)) {
if (this.isVersion2007) {
end = cal.fromRFC3339(xml2json.getTagValue(aCi, "t:EndTime", null), this.globalFunctions.ecUTC());
end = cal.dtz.fromRFC3339(xml2json.getTagValue(aCi, "t:EndTime", null), this.globalFunctions.ecUTC());
}
else {
end = cal.fromRFC3339(xml2json.getTagValue(aCi, "t:EndTime", null), this.globalFunctions.ecDefaultTimeZone());
end = cal.dtz.fromRFC3339(xml2json.getTagValue(aCi, "t:EndTime", null), this.globalFunctions.ecDefaultTimeZone());
}
}
......@@ -6406,7 +6406,7 @@ calExchangeCalendar.prototype = {
tryToSetDateValue: function _TryToSetDateValue(ewsvalue, aDefault) {
if ((ewsvalue) && (ewsvalue.toString().length)) {
return cal.fromRFC3339(ewsvalue, this.globalFunctions.ecTZService().UTC).getInTimezone(this.globalFunctions.ecDefaultTimeZone());
return cal.dtz.fromRFC3339(ewsvalue, this.globalFunctions.ecTZService().UTC).getInTimezone(this.globalFunctions.ecDefaultTimeZone());
}
return aDefault;
......@@ -7418,10 +7418,10 @@ else { dump("Occurrence does not exist in cache anymore.\n");}
item.startDate = null;
if (xml2json.getTagValue(aCalendarEvent, "t:StartTime", null)) {
if (this.isVersion2007) {
item.startDate = cal.fromRFC3339(xml2json.getTagValue(aCalendarEvent, "t:StartTime", null), this.globalFunctions.ecUTC());
item.startDate = cal.dtz.fromRFC3339(xml2json.getTagValue(aCalendarEvent, "t:StartTime", null), this.globalFunctions.ecUTC());
}
else {
item.startDate = cal.fromRFC3339(xml2json.getTagValue(aCalendarEvent, "t:StartTime", null), this.globalFunctions.ecDefaultTimeZone());
item.startDate = cal.dtz.fromRFC3339(xml2json.getTagValue(aCalendarEvent, "t:StartTime", null), this.globalFunctions.ecDefaultTimeZone());
}
}
......@@ -7435,10 +7435,10 @@ else { dump("Occurrence does not exist in cache anymore.\n");}
item.endDate = null;
if (xml2json.getTagValue(aCalendarEvent, "t:EndTime", null)) {
if (this.isVersion2007) {
item.endDate = cal.fromRFC3339(xml2json.getTagValue(aCalendarEvent, "t:EndTime", null), this.globalFunctions.ecUTC());
item.endDate = cal.dtz.fromRFC3339(xml2json.getTagValue(aCalendarEvent, "t:EndTime", null), this.globalFunctions.ecUTC());
}
else {
item.endDate = cal.fromRFC3339(xml2json.getTagValue(aCalendarEvent, "t:EndTime", null), this.globalFunctions.ecDefaultTimeZone());
item.endDate = cal.dtz.fromRFC3339(xml2json.getTagValue(aCalendarEvent, "t:EndTime", null), this.globalFunctions.ecDefaultTimeZone());
}
}
......
......@@ -132,8 +132,8 @@ erGetUserOofSettingsRequest.prototype = {
var duration = oofSettingsXML.getTag("t:Duration");
if (duration) {
oofSettings.startTime = cal.fromRFC3339(duration.getTagValue("t:StartTime"), exchWebService.commonFunctions.ecTZService().UTC).getInTimezone(exchWebService.commonFunctions.ecDefaultTimeZone());
oofSettings.endTime = cal.fromRFC3339(duration.getTagValue("t:EndTime"), exchWebService.commonFunctions.ecTZService().UTC).getInTimezone(exchWebService.commonFunctions.ecDefaultTimeZone());
oofSettings.startTime = cal.dtz.fromRFC3339(duration.getTagValue("t:StartTime"), exchWebService.commonFunctions.ecTZService().UTC).getInTimezone(exchWebService.commonFunctions.ecDefaultTimeZone());
oofSettings.endTime = cal.dtz.fromRFC3339(duration.getTagValue("t:EndTime"), exchWebService.commonFunctions.ecTZService().UTC).getInTimezone(exchWebService.commonFunctions.ecDefaultTimeZone());
}
oofSettings.internalReply = oofSettingsXML.getTag("t:InternalReply").getTagValue("t:Message", null);
......
......@@ -3635,7 +3635,7 @@ mivExchangeBaseItem.prototype = {
break;
case 'StartDate':
/* Dunno what to do with this for iCal; no place to set */
this._recurrenceStartDate = cal.fromRFC3339(xml2json.getValue(comp).substr(0, 10) + "T00:00:00Z", exchGlobalFunctions.ecTZService().UTC);
this._recurrenceStartDate = cal.dtz.fromRFC3339(xml2json.getValue(comp).substr(0, 10) + "T00:00:00Z", exchGlobalFunctions.ecTZService().UTC);
this._recurrenceStartDate.isDate = true;
break;
case 'EndDate':
......@@ -3750,10 +3750,10 @@ mivExchangeBaseItem.prototype = {
tryToSetDateValueUTC: function _tryToSetDateValueUTC(ewsvalue, aDefault) {
if ((ewsvalue) && (ewsvalue.toString().length)) {
if (ewsvalue.indexOf("Z") > -1) {
return cal.fromRFC3339(ewsvalue, exchGlobalFunctions.ecTZService().UTC);
return cal.dtz.fromRFC3339(ewsvalue, exchGlobalFunctions.ecTZService().UTC);
}
else {
return cal.fromRFC3339(ewsvalue, exchGlobalFunctions.ecDefaultTimeZone()).getInTimezone(exchGlobalFunctions.ecTZService().UTC);
return cal.dtz.fromRFC3339(ewsvalue, exchGlobalFunctions.ecDefaultTimeZone()).getInTimezone(exchGlobalFunctions.ecTZService().UTC);
}
}
......@@ -3762,7 +3762,7 @@ mivExchangeBaseItem.prototype = {
tryToSetDateValueDefaultTZ: function _tryToSetDateValueDefaultTZ(ewsvalue, aDefault) {
if ((ewsvalue) && (ewsvalue.toString().length)) {
return cal.fromRFC3339(ewsvalue, exchGlobalFunctions.ecDefaultTimeZone());
return cal.dtz.fromRFC3339(ewsvalue, exchGlobalFunctions.ecDefaultTimeZone());
}
return aDefault;
......@@ -3770,7 +3770,7 @@ mivExchangeBaseItem.prototype = {
tryToSetDateValue: function _TryToSetDateValue(ewsvalue, aDefault) {
if ((ewsvalue) && (ewsvalue.toString().length)) {
return cal.fromRFC3339(ewsvalue, exchGlobalFunctions.ecTZService().UTC).getInTimezone(exchGlobalFunctions.ecDefaultTimeZone());
return cal.dtz.fromRFC3339(ewsvalue, exchGlobalFunctions.ecTZService().UTC).getInTimezone(exchGlobalFunctions.ecDefaultTimeZone());
}
return aDefault;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment