diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2015-09-09 18:52:45 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-09 09:15:55 -0700 |
commit | 6ff1837b059e91a3445a92d719755a02108b908f (patch) | |
tree | a9164d55480f52eb978e5aa10916aed27e57e9a9 | |
parent | 43627922e0c7ba50b7db95175678ae1a9f7dbdce (diff) | |
download | subsurface-6ff1837b059e91a3445a92d719755a02108b908f.tar.gz |
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 <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qthelper.cpp | 4 |
1 files 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() |