mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-11 11:31:29 +00:00
Planner: start time is relative
This almost fixes it, but the offset from UTC isn't calculated correctly it seems. Committing and hoping that a Qt expert can help. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f138006d1a
commit
88b7ac3d08
1 changed files with 1 additions and 1 deletions
|
@ -1021,7 +1021,7 @@ void DivePlannerPointsModel::setLastStop6m(bool value)
|
||||||
|
|
||||||
void DivePlannerPointsModel::setStartTime(const QTime& t)
|
void DivePlannerPointsModel::setStartTime(const QTime& t)
|
||||||
{
|
{
|
||||||
diveplan.when = t.msec();
|
diveplan.when = (t.msec() + QDateTime::currentMSecsSinceEpoch()) / 1000 - Qt::OffsetFromUTC * 3600;
|
||||||
emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, COLUMNS-1));
|
emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, COLUMNS-1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue