Commit 710794ae authored by Glen Ditchfield's avatar Glen Ditchfield 🐛 Committed by Glen Ditchfield
Browse files

Fix display of multi-day events from non-local time zones

If an event is in a non-local time zone, and extends past midnight in the
local time zone but not in its own time zone, the agenda view miscalculates
the number of day columns that it should display the event in.

BUG: 429007
parent 61ce1bd8
Pipeline #43851 passed with stage
in 7 minutes and 46 seconds
......@@ -572,7 +572,7 @@ void AgendaView::Private::insertIncidence(const KCalendarCore::Incidence::Ptr &i
if (event) {
const QDate firstVisibleDate = mSelectedDates.first();
// its crossing bounderies, lets calculate beginX and endX
const int duration = event->dtStart().toLocalTime().daysTo(event->dtEnd());
const int duration = event->dtStart().toLocalTime().daysTo(event->dtEnd().toLocalTime());
if (insertAtDate < firstVisibleDate) {
beginX = curCol + firstVisibleDate.daysTo(insertAtDate);
endX = beginX + duration;
......
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