aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-07 16:33:10 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-07 16:34:07 +0900
commitf11b2274ec8921235ff534a6f138a3f69b69531a (patch)
tree3add0c4051ccdd9378caeb1405f914b4ab857adf
parent4e9a29a0af2281a3a7bc484fbe8f44bc1e2a409c (diff)
downloadsubsurface-f11b2274ec8921235ff534a6f138a3f69b69531a.tar.gz
Adjust default start time of added dive
It should be 'now' in the current timezone. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index b712e1783..7709ff10b 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -279,7 +279,7 @@ void MainWindow::on_actionAddDive_triggered()
DivePlannerPointsModel::instance()->setPlanMode(false);
// now cheat - create one dive that we use to store the info tab data in
struct dive *dive = alloc_dive();
- dive->when = QDateTime::currentMSecsSinceEpoch() / 1000L;
+ dive->when = QDateTime::currentMSecsSinceEpoch() / 1000L + gettimezoneoffset();
const char* model = strdup(tr("manually added dive").toLocal8Bit().constData());
dive->dc.model = model; // do not use tr here since it expects a char*.
record_dive(dive);