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:
Dirk Hohndel 2013-09-16 23:17:24 -04:00
parent f138006d1a
commit 88b7ac3d08

View file

@ -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));
} }