From 1d8d6cf2ced4dfc695e5fc01b51beb0a33dd0fe4 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 2 Sep 2022 11:37:25 -0400 Subject: [PATCH] Echo-mode UTC should be that at start of Echo or Monitor cycle. --- widgets/mainwindow.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index e32d9e5ca..c0ce51483 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1623,7 +1623,13 @@ void MainWindow::dataSink(qint64 frames) if(m_diskData) { t0=t0.asprintf("%06d ",m_UTCdisk); } else { - t0=QDateTime::currentDateTimeUtc().toString("hhmmss "); + QDateTime now=QDateTime::currentDateTimeUtc(); + int ihr=now.toString("hh").toInt(); + int imin=now.toString("mm").toInt(); + int isec=now.toString("ss").toInt(); + if(m_auto) isec=isec - isec%6; + if(!m_auto) isec=isec - isec%3; + t0=t0.asprintf("%02d%02d%02d",ihr,imin,isec); } int n=t0.toInt(); int nsec=((n/10000)*3600) + (((n/100)%100)*60) + (n%100);