Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.12.3, 5.12.4, 5.13.1
Description
User found out that QDateTime and QVariant that get values using
QDateTime::currentDateTimeUtc() get converted to non-UTC time when values are passed to QML with engine.rootContext()->setContextProperty().
Tested in support and could get the following results: (C++) DateTime QDateTime(2019-10-14 10:01:24.693 UTC Qt::UTC) (C++) DateTimeInVariant QVariant(QDateTime, QDateTime(2019-10-14 10:01:24.693 UTC Qt::UTC)) qml: (QML) DateTime Mon Oct 14 13:01:24 2019 GMT+0300 qml: (QML) DateTimeInVariant Mon Oct 14 13:01:24 2019 GMT+0300
Example code is attached.