diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-05-22 18:53:25 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-22 12:31:06 -0700 |
commit | 8f80129bac29227a03c35940af9d197ef0fa6398 (patch) | |
tree | 40cd682efb11880af5410aab700dcd9d8bacbe72 /qt-models/divesummarymodel.cpp | |
parent | e33e420ef3e5139015504ef49215721e99850f2b (diff) | |
download | subsurface-8f80129bac29227a03c35940af9d197ef0fa6398.tar.gz |
cleanup: create common QDateTime -> timestamp conversion function
In analogy to the timestamp -> QDateTime conversion, create a
common function.
1) For symmetry with the opposite conversion.
2) To remove numerous inconsistencies.
3) To remove use of the deprecated QDateTime::toTime_t() function.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divesummarymodel.cpp')
-rw-r--r-- | qt-models/divesummarymodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/divesummarymodel.cpp b/qt-models/divesummarymodel.cpp index f12a345e5..d187f2b58 100644 --- a/qt-models/divesummarymodel.cpp +++ b/qt-models/divesummarymodel.cpp @@ -263,7 +263,7 @@ void DiveSummaryModel::calc(int column, int period) if (startTime == currentTime) start = 0; else - start = startTime.toMSecsSinceEpoch() / 1000L + gettimezoneoffset(); + start = dateTimeToTimestamp(startTime) + gettimezoneoffset(); // Loop over all dives and sum up data Stats stats = loopDives(start); |