Skip to content

Commit

Permalink
Merge branch 'jb47814' into 'master'
Browse files Browse the repository at this point in the history
[buteo-sync-plugins-social] Updated kcalcore exports exclusive dtEnd. Contributes to JB#47814

See merge request mer-core/buteo-sync-plugins-social!50
  • Loading branch information
chriadam committed Jun 17, 2020
2 parents 6bdb29f + a52c12d commit 41df33f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/google/google-calendars/googlecalendarsyncadaptor.cpp
Expand Up @@ -439,8 +439,7 @@ QJsonObject kCalToJson(KCalCore::Event::Ptr event, KCalCore::ICalFormat &icalFor
start.insert(QLatin1String("timeZone"), QJsonValue(event->dtStart().toString(KLONGTZ_FORMAT)));
}
if (event->dtEnd().isDateOnly() || (event->allDay() && event->dtEnd().time() == QTime(0,0,0))) {
// note: for iCal spec, allDay events need to have an end date of real-end-date+1 as end date is exclusive.
end.insert(QLatin1String("date"), QLocale::c().toString(event->dateEnd().addDays(1), QDATEONLY_FORMAT));
end.insert(QLatin1String("date"), QLocale::c().toString(event->dateEnd(), QDATEONLY_FORMAT));
} else {
end.insert(QLatin1String("dateTime"), event->dtEnd().toString(RFC3339_FORMAT));
end.insert(QLatin1String("timeZone"), QJsonValue(event->dtEnd().toString(KLONGTZ_FORMAT)));
Expand Down

0 comments on commit 41df33f

Please sign in to comment.