summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 7fae4a9..bc8625d 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1148,14 +1148,14 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
}
int delFut = 0;
if ( KOPrefs::instance()->mWriteBackInFuture ) {
er = remote->rawIncidences();
inR = er.first();
QDateTime dt;
- QDateTime cur = QDateTime::currentDateTime();
- QDateTime end = cur.addSecs( KOPrefs::instance()->mWriteBackInFuture * 3600 *24 *7 );
+ QDateTime cur = QDateTime::currentDateTime().addDays( -7 );
+ QDateTime end = cur.addDays( (KOPrefs::instance()->mWriteBackInFuture +1 ) *7 );
while ( inR ) {
if ( inR->type() == "Todo" ) {
Todo * t = (Todo*)inR;
if ( t->hasDueDate() )
dt = t->dtDue();
else