Hello,
I want compare two DataTime but result is strange to me, and I don't know why is that happening. My code is:
Files have identical lastModified time, but result to above qDebug is:Code:
QDateTime srcLastmodif, dstLastmodif; srcLastmodif.setTimeSpec( Qt::UTC ); dstLastmodif.setTimeSpec( Qt::UTC ); finfo.setFile( dstList[i] ); dstLastmodif = finfo.lastModified(); finfo.setFile( srcList[i] ); srcLastmodif = finfo.lastModified(); qDebug() << srcLastmodif << " > " << dstLastmodif << " : " << (srcLastmodif > dstLastmodif);
As You can see the above 5 qdatatime are identical (assuming that qDebug print all the data in obj. ).Code:
srcLastmodif > dstLastmodif : (srcLastmodif > dstLastmodif)
So my question: Why only 1 of comparison is FALSE, shouldn't all be FALSE?
Thank you for any hints, because probably I miss something obvious here.