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; }
Attachments
For Gerrit Dashboard: QTBUG-30250 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
54635,6 | Make QTime::toString output milliseconds for Qt::TextDate, Qt::ISODate. | dev | qt/qtbase | Status: MERGED | +2 | 0 |