Commit b9fd9224 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

PimEventsPlugin: fix start/end time of all-day events in different TZ

parent 33032d5d
......@@ -105,10 +105,16 @@ QVector<CalendarEvents::EventData> BaseEventDataVisitor::explodeIncidenceOccuren
QVector<CalendarEvents::EventData> results;
while (rec.isValid() && rec.date() <= mEnd) {
CalendarEvents::EventData copy = ed;
const QDateTime dt = rec.dateTime();
QDateTime dt;
if (incidence->allDay()) {
dt = QDateTime(rec.date(), QTime(0, 0, 0), Qt::LocalTime);
} else {
dt = rec.toLocalZone().dateTime();
}
copy.setStartDateTime(dt);
copy.setEndDateTime(dt.addSecs(duration));
copy.setUid(generateUid(incidence, rec));
results.push_back(copy);
rec = incidence->recurrence()->getNextDateTime(rec);
......
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