Details
-
Sub-task
-
Resolution: Done
-
P3: Somewhat important
-
None
-
I2578f290845e46a8f49be489f1d7427984ae7f08
Description
Running the code below produces:
false
true
but both results should be true.
Since the time is still valid according to ISO 8601 [1][2] section 4.2.2.3, it would be expected that QTime::fromString() returns a valid QTime instance representing 10:00.
[1] http://isotc.iso.org/livelink/livelink/4021199/ISO_8601_2004_E.zip?func=doc.Fetch&nodeid=4021199
[2] http://dotat.at/tmp/ISO_8601-2004_E.pdf
Code to reproduce:
// -----------------------------------------
#include <QtCore>
int main( int argc, char * argv[] )
{
QCoreApplication app( argc, argv );
QTime time = QTime::fromString( "10:00", Qt::ISODate );
qDebug() << time.isValid();
time = QTime::fromString( "10:00", "hh:mm" );
qDebug() << time.isValid();
return 0;
}
// -----------------------------------------