diff options
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index d46f364fb..3df1e8a32 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -391,8 +391,9 @@ void MainTab::updateDiveInfo(int dive) UPDATE_TEMP(d, watertemp); if (d) { updateGpsCoordinates(d); - ui.dateEdit->setDate(QDateTime::fromTime_t(d->when).date()); - ui.timeEdit->setTime(QDateTime::fromTime_t(d->when).time()); + QDateTime localTime = QDateTime::fromTime_t(d->when - gettimezoneoffset()); + ui.dateEdit->setDate(localTime.date()); + ui.timeEdit->setTime(localTime.time()); if (MainWindow::instance() && MainWindow::instance()->dive_list()->selectedTrips().count() == 1) { setTabText(0, tr("Trip Notes")); // only use trip relevant fields |