mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:03:23 +00:00
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>
This commit is contained in:
parent
43627922e0
commit
6ff1837b05
1 changed files with 2 additions and 2 deletions
|
@ -167,8 +167,8 @@ void Dive::put_date_time()
|
||||||
{
|
{
|
||||||
QDateTime localTime = QDateTime::fromTime_t(dive->when - gettimezoneoffset(displayed_dive.when));
|
QDateTime localTime = QDateTime::fromTime_t(dive->when - gettimezoneoffset(displayed_dive.when));
|
||||||
localTime.setTimeSpec(Qt::UTC);
|
localTime.setTimeSpec(Qt::UTC);
|
||||||
m_date = localTime.date().toString(QString::fromUtf8("MMM dd, yyyy"));
|
m_date = localTime.date().toString(dateFormat);
|
||||||
m_time = localTime.time().toString(QString::fromUtf8("hh:mm a"));
|
m_time = localTime.time().toString(timeFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Dive::put_timestamp()
|
void Dive::put_timestamp()
|
||||||
|
|
Loading…
Add table
Reference in a new issue