From b3e662a895f6106846b236816ea13a458b95ab4a Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 16 Jul 2014 20:23:15 -0700 Subject: Pick the correct timezoneoffset for the day in question Calculating the timezoneoffset for the current date really makes no sense whatsoever when displaying a time that isn't "now". Fixes #605 Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 4c46d36ac..7c85825d4 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -380,7 +380,7 @@ void MainTab::updateDiveInfo(bool clear) if (!clear) { updateGpsCoordinates(&displayed_dive); - QDateTime localTime = QDateTime::fromTime_t(displayed_dive.when - gettimezoneoffset()); + QDateTime localTime = QDateTime::fromTime_t(displayed_dive.when - gettimezoneoffset(displayed_dive.when)); ui.dateEdit->setDate(localTime.date()); ui.timeEdit->setTime(localTime.time()); if (MainWindow::instance() && MainWindow::instance()->dive_list()->selectedTrips().count() == 1) { -- cgit v1.2.3-70-g09d2