mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 04:43:24 +00:00
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>
This commit is contained in:
parent
8baae6a3b6
commit
729ac7619e
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue