summaryrefslogtreecommitdiffstats
path: root/configuredivecomputerthreads.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2016-01-22 14:17:48 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-02-26 09:20:51 +0100
commit19caca1d365302d2e19ee2baf2e623f978d2f41d (patch)
tree85d73f32cbf97781600971b7394014934f1acc06 /configuredivecomputerthreads.cpp
parent57bb04a5291da276eee113bc5aa9c3d794476bce (diff)
downloadsubsurface-19caca1d365302d2e19ee2baf2e623f978d2f41d.tar.gz
Use libdivecomputer libc wrappers instead of Qt
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'configuredivecomputerthreads.cpp')
-rw-r--r--configuredivecomputerthreads.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp
index ececa85e6..e681649e3 100644
--- a/configuredivecomputerthreads.cpp
+++ b/configuredivecomputerthreads.cpp
@@ -1,7 +1,6 @@
#include "configuredivecomputerthreads.h"
#include "libdivecomputer/hw.h"
#include "libdivecomputer.h"
-#include <QDateTime>
#define OSTC3_GAS1 0x10
#define OSTC3_GAS2 0x11
@@ -918,15 +917,10 @@ static dc_status_t write_ostc3_settings(dc_device_t *device, DeviceDetails *m_de
//sync date and time
if (m_deviceDetails->syncTime) {
- QDateTime timeToSet = QDateTime::currentDateTime();
- dc_datetime_t time;
- time.year = timeToSet.date().year();
- time.month = timeToSet.date().month();
- time.day = timeToSet.date().day();
- time.hour = timeToSet.time().hour();
- time.minute = timeToSet.time().minute();
- time.second = timeToSet.time().second();
- rc = hw_ostc3_device_clock(device, &time);
+ dc_datetime_t now;
+ dc_datetime_localtime(&now, dc_datetime_now());
+
+ rc = hw_ostc3_device_clock(device, &now);
}
EMIT_PROGRESS();