From 729ac7619ec04e5cdc958b74f0fd47347bd626e9 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 8 Dec 2015 06:20:51 -0800 Subject: Dive model: use the correct time to set the time zone offset We need to calculate the offset based on the time of the dive - the mobile version doesn't use displayed_dive. This way time stamps are now correct all year round. Signed-off-by: Dirk Hohndel --- subsurface-core/qthelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'subsurface-core/qthelper.cpp') diff --git a/subsurface-core/qthelper.cpp b/subsurface-core/qthelper.cpp index b667ab206..a840f4dd2 100644 --- a/subsurface-core/qthelper.cpp +++ b/subsurface-core/qthelper.cpp @@ -203,7 +203,7 @@ void Dive::put_divemaster() void Dive::put_date_time() { - QDateTime localTime = QDateTime::fromTime_t(dive->when - gettimezoneoffset(displayed_dive.when)); + QDateTime localTime = QDateTime::fromTime_t(dive->when - gettimezoneoffset(dive->when)); localTime.setTimeSpec(Qt::UTC); m_date = localTime.date().toString(prefs.date_format); m_time = localTime.time().toString(prefs.time_format); -- cgit v1.2.3-70-g09d2