I have a QT program that has been functioning properly in Windows for a few months, but recently (after the DST shift maybe?) started acting strangely. I have the following function:
if (!obFileInfo.exists() ) {
qDebug() << "File " << sFilename << " does not exist, no local stamp";
*pbSuccess = false;
return( obStamp );
}
//qDebug() << "Checking local stamp on " << sFilename;
obStamp = obFileInfo.lastModified();
*pbSuccess = true;
return( obStamp );
} //GetLocalStamp
QDateTime frmMain::GetLocalStamp( QString sFilename, bool *pbSuccess ) {
QDateTime obStamp;
QFileInfo obFileInfo(sFilename);
if (!obFileInfo.exists() ) {
qDebug() << "File " << sFilename << " does not exist, no local stamp";
*pbSuccess = false;
return( obStamp );
}
//qDebug() << "Checking local stamp on " << sFilename;
obStamp = obFileInfo.lastModified();
*pbSuccess = true;
return( obStamp );
} //GetLocalStamp
To copy to clipboard, switch view to plain text mode
If I qDebug() the returned QDateTime object, it is one hour off from the time the Operating system reports. Is this a known issue, or is there some step I am missing?
Bookmarks