Commit 6ec0ed4b authored by Volker Krause's avatar Volker Krause

Actually translate recurring events to our time zone

This fixes recurring events in other timezones show up with their local
times in the What's next view.
parent 35233eeb
...@@ -133,7 +133,7 @@ void WhatsNextView::updateView() ...@@ -133,7 +133,7 @@ void WhatsNextView::updateView()
KDateTime end = start.addSecs(duration); KDateTime end = start.addSecs(duration);
KDateTime endDate(mEndDate, QTime(23, 59, 59), timeSpec); KDateTime endDate(mEndDate, QTime(23, 59, 59), timeSpec);
if (end.date() >= mStartDate) { if (end.date() >= mStartDate) {
appendEvent(ev, start.dateTime(), end.dateTime()); appendEvent(ev, start.toLocalZone().dateTime(), end.toLocalZone().dateTime());
} }
KCalCore::DateTimeList times = recur->timesInInterval(start, endDate); KCalCore::DateTimeList times = recur->timesInInterval(start, endDate);
int count = times.count(); int count = times.count();
...@@ -146,7 +146,7 @@ void WhatsNextView::updateView() ...@@ -146,7 +146,7 @@ void WhatsNextView::updateView()
--count; // list overflow --count; // list overflow
} }
for (; i < count && times[i].date() <= mEndDate; ++i) { for (; i < count && times[i].date() <= mEndDate; ++i) {
appendEvent(ev, times[i].dateTime()); appendEvent(ev, times[i].toLocalZone().dateTime());
} }
} }
} }
......
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