Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 70ab1bca authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

User helper methods to convert between KDT and QDT

parent 7a1c1efc
......@@ -30,6 +30,7 @@
#include <KCalCore/Event>
#include <KCalCore/Todo>
#include <KCalCore/Journal>
#include <KCalCore/Utils>
#include <KLocalizedString>
#include <KDateTime>
......@@ -552,15 +553,15 @@ void CalendarJanitor::sanityCheck9()
if (event && start.isValid() && end.isValid()) {
modified = true;
const int duration = start.daysTo(end.toTimeSpec(start.timeSpec()));
incidence->setDtStart(KDateTime(recId));
event->setDtEnd(KDateTime(recId.addDays(duration)));
incidence->setDtStart(KCalCore::q2k(recId));
event->setDtEnd(KCalCore::q2k(recId.addDays(duration)));
} else if (todo && start.isValid()) {
modified = true;
incidence->setDtStart(KDateTime(recId));
incidence->setDtStart(KCalCore::q2k(recId));
if (end.isValid()) {
const int duration = start.daysTo(end.toTimeSpec(start.timeSpec()));
todo->setDtDue(KDateTime(recId.addDays(duration)));
todo->setDtDue(KCalCore::q2k(recId.addDays(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