[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/pim/googledata/calendar
From:       Sergio Luis Martins <iamsergio () gmail ! com>
Date:       2011-01-21 15:45:15
Message-ID: 20110121154515.26474AC8B9 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1216151 by smartins:

Fixed some more places that assumed that KCal::Event::dtEnd() was exclusive instead of inclusive.

BUG: 252568
CCBUG: savagobr@yahoo.com


 M  +12 -0     gcalresource.cpp  


--- trunk/extragear/pim/googledata/calendar/gcalresource.cpp #1216150:1216151
@@ -538,6 +538,12 @@
 	gcal_event_set_start(event, t_byte.data());
 
 	time = kevent->dtEnd();
+	
+	if (time.isDateOnly()) {
+		// KCal::Event::dtEnd() is inclusive, not exclusive.
+		time = time.addDays(1);
+	}
+	
 	temp = time.toString(KDateTime::ISODate);
 	t_byte = temp.toUtf8();
 	gcal_event_set_end(event, t_byte.data());
@@ -638,6 +644,12 @@
 	gcal_event_set_start(event, t_byte.data());
 
 	time = kevent->dtEnd();
+
+	if (time.isDateOnly()) {
+		// KCal::Event::dtEnd() is inclusive, not exclusive.
+		time = time.addDays(1);
+	}
+
 	temp = time.toString(KDateTime::ISODate);
 	t_byte = temp.toUtf8();
 	gcal_event_set_end(event, t_byte.data());
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic