Store UTC mtime not local one

This commit is contained in:
2022-04-11 10:33:53 +02:00
parent 61a618b2fd
commit c51be18d28
+2 -2
View File
@@ -161,12 +161,12 @@ bool Database::indexDir2(const QDir &dir, QProgressDialog *progress)
progress->setValue(m_progress++); progress->setValue(m_progress++);
if(progress->wasCanceled())return false; if(progress->wasCanceled())return false;
QString filePath = file.absoluteFilePath(); QString filePath = file.absoluteFilePath();
QString mtime = file.fileTime(QFileDevice::FileModificationTime).toString(Qt::ISODate); QString mtime = file.fileTime(QFileDevice::FileModificationTime).toUTC().toString(Qt::ISODate);
m_checkFile.bindValue(0, filePath); m_checkFile.bindValue(0, filePath);
m_checkFile.exec(); m_checkFile.exec();
if(m_checkFile.next()) if(m_checkFile.next())
{ {
if(m_checkFile.value(1).toString() == file.fileTime(QFileDevice::FileModificationTime).toString(Qt::ISODate)) if(m_checkFile.value(1).toString() == mtime)
continue; continue;
else else
{ {