From 88b7ac3d0800759120c9a3559aefdbf7df39f9fe Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 16 Sep 2013 23:17:24 -0400 Subject: Planner: start time is relative This almost fixes it, but the offset from UTC isn't calculated correctly it seems. Committing and hoping that a Qt expert can help. Signed-off-by: Dirk Hohndel --- qt-ui/diveplanner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/diveplanner.cpp') diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index ceb5ebdba..ba578fed1 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -1021,7 +1021,7 @@ void DivePlannerPointsModel::setLastStop6m(bool value) void DivePlannerPointsModel::setStartTime(const QTime& t) { - diveplan.when = t.msec(); + diveplan.when = (t.msec() + QDateTime::currentMSecsSinceEpoch()) / 1000 - Qt::OffsetFromUTC * 3600; emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, COLUMNS-1)); } -- cgit v1.2.3-70-g09d2