Commit 9da2e1ad authored by Volker Krause's avatar Volker Krause

Remove a few more KDateTime::Spec uses

parent 9bb9676b
......@@ -82,7 +82,7 @@ AgendaItem::AgendaItem(EventView *eventView, const MultiViewCalendar::Ptr &calen
mIncidence = Incidence::Ptr(mIncidence->clone());
if (mIncidence->customProperty("KABC", "BIRTHDAY") == QLatin1String("YES") ||
mIncidence->customProperty("KABC", "ANNIVERSARY") == QLatin1String("YES")) {
const int years = EventViews::yearDiff(mIncidence->dtStart().date(), qd.toTimeSpec(mEventView->preferences()->timeSpec()).date());
const int years = EventViews::yearDiff(mIncidence->dtStart().date(), qd.toLocalZone().date());
if (years > 0) {
mIncidence->setReadOnly(false);
mIncidence->setSummary(i18np("%2 (1 year)", "%2 (%1 years)", years, mIncidence->summary()));
......
......@@ -663,9 +663,9 @@ void AgendaView::Private::insertIncidence(const KCalCore::Incidence::Ptr &incide
// The time we get depends on the insertAtDate, because of daylight savings changes
const KDateTime ocurrrenceDateTime = KDateTime(insertAtDate, todo->dtDue().time(),
todo->dtDue().timeSpec());
t = ocurrrenceDateTime.toTimeSpec(timeSpec).time();
t = ocurrrenceDateTime.toLocalZone().time();
} else {
t = todo->dtDue().toTimeSpec(timeSpec).time();
t = todo->dtDue().toLocalZone().time();
}
if (t == QTime(0, 0) && !todo->recurs()) {
......
......@@ -504,7 +504,6 @@ void MonthView::reloadIncidences()
}
// build global event list
KDateTime::Spec timeSpec = CalendarSupport::KCalPrefs::instance()->timeSpec();
const bool colorMonthBusyDays = preferences()->colorMonthBusyDays();
KCalCore::OccurrenceIterator occurIter(*calendar(), actualStartDateTime(), actualEndDateTime());
......@@ -537,7 +536,7 @@ void MonthView::reloadIncidences()
calendar(),
item,
occurIter.incidence(),
occurIter.occurrenceStartDate().toTimeSpec(timeSpec).date());
occurIter.occurrenceStartDate().toLocalZone().date());
d->scene->mManagerList << manager;
if (d->selectedItemId == item.id() &&
manager->realStartDate() == d->selectedItemDate) {
......
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