Show Date in Network Tab using QT functions.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@736 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
notdefine 2008-09-22 20:01:01 +00:00
parent 5bbc5cc6af
commit cd750d2024

View File

@ -301,16 +301,15 @@ void NetworkDialog::insertConnect()
} else { } else {
out << "0"; // Is zero out << "0"; // Is zero
} }
item -> setText(3, QString::fromStdString(out.str()));
} else { } else {
// Dont Show a timestamp in RS calculate the day // Dont Show a timestamp in RS calculate the day
time_t seconds; QDateTime datum = QDateTime::fromTime_t(detail.lastConnect);
seconds=detail.lastConnect; // out << datum.toString(Qt::LocalDate);
struct tm *tmnow= localtime(&seconds); QString stime = datum.toString(Qt::LocalDate);
// out << setfill ("0"); why does this not work?
out << tmnow->tm_hour << ":" << tmnow->tm_min << ":" << tmnow->tm_sec << " "; item -> setText(3, stime);
out << tmnow->tm_mday << "." << tmnow->tm_mon + 1 << "." << tmnow->tm_year + 1900;
} }
item -> setText(3, QString::fromStdString(out.str()));
} }
/* (4) Person */ /* (4) Person */