From d551857d1bf0e99f98585ca5c4060df5b2475c24 Mon Sep 17 00:00:00 2001 From: Ladislav Foldyna Date: Tue, 7 Nov 2023 16:38:42 +0100 Subject: [PATCH] Fixed #254 - LoTW QSL import reports unmatched QSOs sometime QLog has a time tolerance of +-1 hour for QSL import (eQSL and LoTW). However, if there is the same QSO in this +-1 hour interval, QLog declares this QSO as Unmatched, because it is not able to pair them exactly (even though they have the same times). It seems that LoTW time tolerance is +-30 minutes. Qlog is changed to the same interval. --- logformat/LogFormat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logformat/LogFormat.cpp b/logformat/LogFormat.cpp index 3730cace..66a0291a 100644 --- a/logformat/LogFormat.cpp +++ b/logformat/LogFormat.cpp @@ -252,7 +252,7 @@ unsigned long LogFormat::runImport(QTextStream& importLogStream, "WHERE callsign=upper(:callsign) " "AND upper(mode)=upper(:mode) " "AND upper(band)=upper(:band) " - "AND ABS(JULIANDAY(start_time)-JULIANDAY(datetime(:startdate)))*24<1") ) + "AND ABS(JULIANDAY(start_time)-JULIANDAY(datetime(:startdate)))*24*60<30") ) { qWarning() << "cannot prepare Dup statement"; return 0; @@ -589,7 +589,7 @@ void LogFormat::runQSLImport(QSLFrom fromService) } // It is important to use callsign index here - QString matchFilter = QString("callsign=upper('%1') AND upper(mode)=upper('%2') AND upper(band)=upper('%3') AND ABS(JULIANDAY(start_time)-JULIANDAY(datetime('%4')))*24<1") + QString matchFilter = QString("callsign=upper('%1') AND upper(mode)=upper('%2') AND upper(band)=upper('%3') AND ABS(JULIANDAY(start_time)-JULIANDAY(datetime('%4')))*24*60<30") .arg(QSLRecord.value("callsign").toString(), QSLRecord.value("mode").toString(), QSLRecord.value("band").toString(),