diff options
Diffstat (limited to 'core/subsurface-qt')
-rw-r--r-- | core/subsurface-qt/diveobjecthelper.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/subsurface-qt/diveobjecthelper.cpp b/core/subsurface-qt/diveobjecthelper.cpp index 7c8651507..45cb73868 100644 --- a/core/subsurface-qt/diveobjecthelper.cpp +++ b/core/subsurface-qt/diveobjecthelper.cpp @@ -328,15 +328,13 @@ DiveObjectHelperGrantlee::DiveObjectHelperGrantlee(const struct dive *d) : QString DiveObjectHelper::date() const { - QDateTime localTime = QDateTime::fromMSecsSinceEpoch(1000 * timestamp, Qt::UTC); - localTime.setTimeSpec(Qt::UTC); + QDateTime localTime = timestampToDateTime(timestamp); return localTime.date().toString(prefs.date_format_short); } QString DiveObjectHelper::time() const { - QDateTime localTime = QDateTime::fromMSecsSinceEpoch(1000 * timestamp, Qt::UTC); - localTime.setTimeSpec(Qt::UTC); + QDateTime localTime = timestampToDateTime(timestamp); return localTime.time().toString(prefs.time_format); } |