From 2ff80f218ac4249bee70f8a35bc73bccf5e95980 Mon Sep 17 00:00:00 2001 From: "mozilla%kewis.ch" Date: Tue, 30 Oct 2007 20:23:17 +0000 Subject: [PATCH] Fix bug 401710 - Unable to dismiss zero duration events. r=dbo git-svn-id: svn://10.0.0.236/trunk@238347 18797224-902f-48f8-a5cc-f745e15eee43 --- .../providers/gdata/components/calGoogleUtils.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mozilla/calendar/providers/gdata/components/calGoogleUtils.js b/mozilla/calendar/providers/gdata/components/calGoogleUtils.js index 7071da88a84..4905124f582 100644 --- a/mozilla/calendar/providers/gdata/components/calGoogleUtils.js +++ b/mozilla/calendar/providers/gdata/components/calGoogleUtils.js @@ -646,10 +646,12 @@ function ItemToXMLEntry(aItem, aAuthorEmail, aAuthorName) { var duration = aItem.endDate.subtractDate(aItem.startDate); entry.gd::when.@startTime = toRFC3339(aItem.startDate); - if (duration != "PT0S") { - // Zero Duration Events must not have an end time - entry.gd::when.@endTime = toRFC3339(aItem.endDate); - } + // Google's documentation says that zero length events should be defined by + // omitting the end time. This currently does not work though. Workaround is + // to always pass an end time. See + // http://code.google.com/p/gdata-issues/issues/detail?id=198 + // for more details. + entry.gd::when.@endTime = toRFC3339(aItem.endDate); // gd:reminder if (aItem.alarmOffset) {