summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Krause <[email protected]>2017-04-08 19:40:14 +0200
committerVolker Krause <[email protected]>2017-04-08 19:40:14 +0200
commit6ec0ed4b1dd83aee224e6870b3be9575eb261d45 (patch)
treeb294991759fa8ea68fa17ba76898e3a47350c805
parent35233eeb1dda314880bfccb374117c89e4474157 (diff)
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.
-rw-r--r--src/whatsnext/whatsnextview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/whatsnext/whatsnextview.cpp b/src/whatsnext/whatsnextview.cpp
index a47e065..afc06aa 100644
--- a/src/whatsnext/whatsnextview.cpp
+++ b/src/whatsnext/whatsnextview.cpp
@@ -133,7 +133,7 @@ void WhatsNextView::updateView()
KDateTime end = start.addSecs(duration);
KDateTime endDate(mEndDate, QTime(23, 59, 59), timeSpec);
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);
int count = times.count();
@@ -146,7 +146,7 @@ void WhatsNextView::updateView()
--count; // list overflow
}
for (; i < count && times[i].date() <= mEndDate; ++i) {
- appendEvent(ev, times[i].dateTime());
+ appendEvent(ev, times[i].toLocalZone().dateTime());
}
}
}