add timezone test for invalid datetimes

This commit is contained in:
Phil Olynyk 2020-02-06 17:17:08 -05:00
parent bd6dabd3e5
commit b178dba420

View File

@ -1494,7 +1494,7 @@ void BackupSTRfiles( const QString path, const QString strBackupPath, MachineInf
STRmap[date] = STRFile(backupfile, stredf); STRmap[date] = STRFile(backupfile, stredf);
} // end for walking the STR files list } // end for walking the STR files list
// qDebug() << "STRmap has" << STRmap.size{} << "entries"; qDebug() << "STRmap has" << STRmap.size() << "entries";
} }
QHash<QString, QString> parseIdentLine( const QString line, MachineInfo * info) QHash<QString, QString> parseIdentLine( const QString line, MachineInfo * info)
@ -1649,6 +1649,8 @@ EDFduration getEDFDuration(const QString & filename)
} }
if ( ! startDate.isValid() ) { if ( ! startDate.isValid() ) {
qDebug() << "Invalid date time retreieved parsing EDF duration for" << filename; qDebug() << "Invalid date time retreieved parsing EDF duration for" << filename;
qDebug() << "Time zone(Utc) is" << startDate.timeZone.abbreviation(QDateTime::currentDateTimeUtc());
qDebug() << "Time zone is" << startDate.timeZone.abbreviation(QDateTime::currentDateTime());
return EDFduration(0, 0, filename); return EDFduration(0, 0, filename);
} }