From 6ff1837b059e91a3445a92d719755a02108b908f Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 9 Sep 2015 18:52:45 +0300 Subject: qthelper.cpp: use timeFormat and dateFormat for the Dive class The Dive class has a method which sets the m_time and m_date members but it uses a custom format. By using the static dateFormat and timeFormat variables this helper class now uses the same date and time format as in the dive list. Fixes #920 Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- qthelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qthelper.cpp b/qthelper.cpp index 51a817296..4ccc16d76 100644 --- a/qthelper.cpp +++ b/qthelper.cpp @@ -167,8 +167,8 @@ void Dive::put_date_time() { QDateTime localTime = QDateTime::fromTime_t(dive->when - gettimezoneoffset(displayed_dive.when)); localTime.setTimeSpec(Qt::UTC); - m_date = localTime.date().toString(QString::fromUtf8("MMM dd, yyyy")); - m_time = localTime.time().toString(QString::fromUtf8("hh:mm a")); + m_date = localTime.date().toString(dateFormat); + m_time = localTime.time().toString(timeFormat); } void Dive::put_timestamp() -- cgit v1.2.3-70-g09d2