From 75d371ebd9ca3df7f29fc709ed3c05a9e71cca24 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Fri, 17 Feb 2017 12:32:40 +0000 Subject: [PATCH] Ensure logged times are UTC Because of the way logged QSO times are split and rebuilt in the QSO logging code the UTC time specification is lost. This change sets them back to UTC since that is what they are. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7566 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- logqso.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/logqso.cpp b/logqso.cpp index 4892d9849..16239ecb1 100644 --- a/logqso.cpp +++ b/logqso.cpp @@ -103,6 +103,13 @@ void LogQSO::accept() rptRcvd=ui->rcvd->text(); m_dateTimeOn = m_dateTimeOn.fromString(ui->dateOn->text()+" "+ui->timeOn->text(),"yyyy-MM-dd hhmm"); m_dateTimeOff = m_dateTimeOff.fromString(ui->dateOff->text()+" "+ui->timeOff->text(),"yyyy-MM-dd hhmm"); + + // set time off and on back to UTC as the above QDateTime::fromString() + // creates a local time value -- this would be al so much simpler if + // QDateTimeEdit widgets had been used + m_dateTimeOff.setTimeSpec (Qt::UTC); + m_dateTimeOn.setTimeSpec (Qt::UTC); + dateOn=ui->dateOn->text(); dateOn=dateOn.mid(0,4) + dateOn.mid(5,2) + dateOn.mid(8,2); timeOn=ui->timeOn->text();