when message timestamp is less then 24 hours then use this format "hh:mm:ss" else "dd.MM.yyyy hh:mm:ss"

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2451 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-02-27 18:40:16 +00:00
parent e23878665b
commit 34735c9668

View File

@ -646,8 +646,16 @@ void MessagesDialog::insertMessages()
{ {
QDateTime qtime; QDateTime qtime;
qtime.setTime_t(it->ts); qtime.setTime_t(it->ts);
if (it->ts > 86400)
{
QString timestamp = qtime.toString("hh:mm:ss");
item3 -> setText(timestamp);
}
else
{
QString timestamp = qtime.toString("dd.MM.yyyy hh:mm:ss"); QString timestamp = qtime.toString("dd.MM.yyyy hh:mm:ss");
item3 -> setText(timestamp); item3 -> setText(timestamp);
}
} }
// From .... // From ....