Merge PR #92: Fix rule creation with time ranges wrapping around midnight

This commit is contained in:
Jenkins 2018-12-18 01:04:26 +01:00
commit 5e8a8770a1

View File

@ -363,7 +363,9 @@ Page {
endTime.setHours(toHourBox.currentIndex);
endTime.setMinutes(toMinuteBox.currentIndex);
root.calendarItem.duration = (endTime.getTime() - time.getTime()) / 60000;
print("duration is", endTime.getTime() - time.getTime(), time, endTime, toMinuteBox.currentIndex)
if (endTime.getTime() < time.getTime()) {
root.calendarItem.duration += (60 * 24)
}
}
switch (repeatingBox.currentIndex) {