What does it mean "is still invalid" ? d2.isValid() returns false or You see somewhere different value than you expect ?
I've changed the second output to
and the output isQt Code:
qDebug() << "d2=" << d2 << ", d2.isValid=" << d2.isValid();To copy to clipboard, switch view to plain text mode
Qt Code:
To copy to clipboard, switch view to plain text mode
Cheers,
_
So change it to :P.S.Qt Code:
qDebug() << "d2=" << d2.toString(format) << ", d2.isValid=" << d2.isValid();To copy to clipboard, switch view to plain text mode
Look at qdatetime.cpp how operator << for qdebug is working for this class.
In Qt 4.8 it uses QDateTime::toString() for this, in 5.7 QDateTime::toString(QStringLiteral("yyyy-MM-dd HH:mm:ss.zzz t")).
So this is not a bug.
Last edited by Lesiok; 5th September 2016 at 12:23.
Bookmarks