diff --git a/mainwindow.cpp b/mainwindow.cpp
index e608315..9efb846 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -8616,8 +8616,8 @@ void MainWindow::on_driftSyncButton_clicked(){
auto now = QDateTime::currentDateTimeUtc();
int n = 0;
- int nPos = 15 - now.time().second() % m_TRperiod;
- int nNeg = now.time().second() % m_TRperiod - 15;
+ int nPos = m_TRperiod - (now.time().second() % m_TRperiod);
+ int nNeg = (now.time().second() % m_TRperiod) - m_TRperiod;
if(abs(nNeg) < nPos){
n = nNeg;
@@ -8632,8 +8632,8 @@ void MainWindow::on_driftSyncEndButton_clicked(){
auto now = QDateTime::currentDateTimeUtc();
int n = 0;
- int nPos = 15 - now.time().second() % m_TRperiod;
- int nNeg = now.time().second() % m_TRperiod - 15;
+ int nPos = m_TRperiod - (now.time().second() % m_TRperiod);
+ int nNeg = (now.time().second() % m_TRperiod) - m_TRperiod;
if(abs(nNeg) < nPos){
n = nNeg + 2;
diff --git a/mainwindow.ui b/mainwindow.ui
index c50f385..0e4c316 100644
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -2037,10 +2037,10 @@ background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #2ecc71, stop:1 #00FF
Time Drift
- -15000
+ -30000
- 15000
+ 30000
100