Hello,
I want compare two DataTime but result is strange to me, and I don't know why is that happening. My code is:

Qt Code:
  1. QDateTime srcLastmodif, dstLastmodif;
  2. srcLastmodif.setTimeSpec( Qt::UTC );
  3. dstLastmodif.setTimeSpec( Qt::UTC );
  4.  
  5. finfo.setFile( dstList[i] );
  6. dstLastmodif = finfo.lastModified();
  7.  
  8. finfo.setFile( srcList[i] );
  9. srcLastmodif = finfo.lastModified();
  10.  
  11. qDebug() << srcLastmodif << " > " << dstLastmodif << " : " << (srcLastmodif > dstLastmodif);
To copy to clipboard, switch view to plain text mode 
Files have identical lastModified time, but result to above qDebug is:

Qt Code:
  1. srcLastmodif > dstLastmodif : (srcLastmodif > dstLastmodif)
  2. QDateTime("Pt 23. kwi 13:47:08 2010") > QDateTime("Pt 23. kwi 13:47:08 2010") : true
  3. QDateTime("Pt 23. kwi 13:47:10 2010") > QDateTime("Pt 23. kwi 13:47:10 2010") : false
  4. QDateTime("Pt 23. kwi 13:47:09 2010") > QDateTime("Pt 23. kwi 13:47:09 2010") : true
  5. QDateTime("Pt 23. kwi 13:47:09 2010") > QDateTime("Pt 23. kwi 13:47:09 2010") : true
To copy to clipboard, switch view to plain text mode 
As You can see the above 5 qdatatime are identical (assuming that qDebug print all the data in obj. ).
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.