summaryrefslogtreecommitdiffstats
path: root/subsurface-core
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-08 06:20:51 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-12-08 06:20:51 -0800
commit729ac7619ec04e5cdc958b74f0fd47347bd626e9 (patch)
tree9a5286aea1eb6bb92776df8bce026b01e8e303e1 /subsurface-core
parent8baae6a3b6de67641ef603307727e5159b522519 (diff)
downloadsubsurface-729ac7619ec04e5cdc958b74f0fd47347bd626e9.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core')
-rw-r--r--subsurface-core/qthelper.cpp2
1 files changed, 1 insertions, 1 deletions
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);