mirror of
https://github.com/tnodir/fort
synced 2024-11-15 06:15:15 +00:00
UI: Statistics: Traffic: Tweak time formats
This commit is contained in:
parent
3e70b4074a
commit
cfb8aac910
@ -220,14 +220,14 @@ QString TrafListModel::formatTrafTime(qint32 trafTime) const
|
||||
const qint64 unixTime = DateUtil::toUnixTime(trafTime);
|
||||
|
||||
switch (m_type) {
|
||||
case TrafTotal:
|
||||
Q_FALLTHROUGH();
|
||||
case TrafHourly:
|
||||
return DateUtil::formatHour(unixTime);
|
||||
case TrafDaily:
|
||||
return DateUtil::formatDay(unixTime);
|
||||
case TrafMonthly:
|
||||
return DateUtil::formatMonth(unixTime);
|
||||
case TrafTotal:
|
||||
return DateUtil::formatHour(unixTime);
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
@ -67,12 +67,12 @@ QString DateUtil::formatHour(qint64 unixTime)
|
||||
|
||||
QString DateUtil::formatDay(qint64 unixTime)
|
||||
{
|
||||
return formatDateTime(unixTime, "dd MMMM yyyy");
|
||||
return formatDateTime(unixTime, "dd-MMM-yyyy");
|
||||
}
|
||||
|
||||
QString DateUtil::formatMonth(qint64 unixTime)
|
||||
{
|
||||
return formatDateTime(unixTime, "MMMM yyyy");
|
||||
return formatDateTime(unixTime, "MMM-yyyy");
|
||||
}
|
||||
|
||||
QString DateUtil::formatDateTime(qint64 unixTime, const QString &format)
|
||||
|
Loading…
Reference in New Issue
Block a user