From a5be16cccad9e7e2eca118102faebf16e349cae5 Mon Sep 17 00:00:00 2001 From: "daniel.boelzle%sun.com" Date: Fri, 20 Oct 2006 10:09:36 +0000 Subject: [PATCH] Bug 340949: server time --- calendar/providers/wcap/calWcapSession.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/calendar/providers/wcap/calWcapSession.js b/calendar/providers/wcap/calWcapSession.js index d8048c9fb6d6..74b1d4a81b33 100644 --- a/calendar/providers/wcap/calWcapSession.js +++ b/calendar/providers/wcap/calWcapSession.js @@ -258,9 +258,11 @@ calWcapSession.prototype = { "gettime.wcap?appid=mozilla-calendar" + "&fmt-out=text%2Fcalendar&id=" + encodeURIComponent(this.m_sessionId)); - // xxx todo: this is no solution! - var localTime = getTime(); var str = issueSyncRequest( url ); + // xxx todo: think about + // assure that locally calculated server time is smaller than the + // current (real) server time: + var localTime = getTime(); var icalRootComp = getIcsService().parseICS( str ); if (icalRootComp == null) throw new Components.Exception("invalid data, expected ical!"); @@ -615,8 +617,7 @@ calWcapSession.prototype = { var wcapResponse = new WcapResponse(); try { try { - wcapResponse.data = dataConvFunc( - data, wcapResponse ); + wcapResponse.data = dataConvFunc( data ); } catch (exc) { if (testResultCode(