Adapt to KCalCore API changes
This change supports both old (pre-QDateTime) and new version.
Differential Revision: https://phabricator.kde.org/D7802