Use QDateTime for interfacing with QML
Summary:
QDate from/to JS Date has unexpected results, so use QDateTime to have a
timezone assigned to prevent conversions. That way the date values are
consistent.
The behaviour got changed with Qt 5.11 (see the linked bug report) which
lead to plasma showing the wrong dates in the calendar.
BUG: 394423
Test Plan:
Tested with and without this patch on Qt 5.10.1 and 5.11.0.
Now the correct date is displayed for -0004 and +0001 timezones.
Reviewers: Plasma, Frameworks, davidedmundson
Reviewed By: Plasma, davidedmundson
Subscribers: ngraham, Zren, sharvey, kde-frameworks-devel
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D13222