diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-09-16 23:17:24 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-09-16 23:17:24 -0400 |
commit | 88b7ac3d0800759120c9a3559aefdbf7df39f9fe (patch) | |
tree | 8d9d9194e81deb46bfedd77324fa474d61d360c3 /qt-ui | |
parent | f138006d1ac3fcd32436075c30bad8fda76c04d7 (diff) | |
download | subsurface-88b7ac3d0800759120c9a3559aefdbf7df39f9fe.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/diveplanner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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)); } |