Details
-
Sub-task
-
Resolution: Invalid
-
Not Evaluated
-
None
-
Kubuntu quantal 64bits up to date
-
15da0a5af20fe6771bcb94ef8d46edbd5c8fb64c
Description
QDateTime in utc converted to string within QVariant, then converted from QVariant string to datetime loose utc.
#include <QtCore> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); const QDateTime dt1 = QDateTime::currentDateTimeUtc(); const QDateTime dt2 = QVariant( dt1.toUTC() ).toDateTime(); const QString dts = QVariant( dt1 ).toString(); const QDateTime dt3 = QVariant( dts ).toDateTime(); qWarning() << ( dt1 == dt2 ) // true << ( dt1 == dt2 ) // true << ( dt1 == dt3 ) // false << dts ; //return a.exec(); return 0; }