mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
COPKGManager: generate a readable string for installation time
This commit is contained in:
@@ -174,6 +174,16 @@ int COPKGManager::exec(CMenuTarget* parent, const string &actionKey)
|
|||||||
//show package info...
|
//show package info...
|
||||||
bool is_installed = pkg_vec[selected]->installed;
|
bool is_installed = pkg_vec[selected]->installed;
|
||||||
string infostr = getPkgInfo(pkg_vec[selected]->name, "", is_installed /*status or info*/);
|
string infostr = getPkgInfo(pkg_vec[selected]->name, "", is_installed /*status or info*/);
|
||||||
|
|
||||||
|
//if available, generate a readable string for installation time
|
||||||
|
if (is_installed){
|
||||||
|
string tstr = getPkgInfo(pkg_vec[selected]->name, "Installed-Time", is_installed);
|
||||||
|
stringstream sstr(tstr);
|
||||||
|
time_t tval; sstr >> tval;
|
||||||
|
string newstr = asctime(localtime(&tval));
|
||||||
|
infostr = str_replace(tstr, newstr, infostr);
|
||||||
|
}
|
||||||
|
|
||||||
DisplayInfoMessage(infostr.c_str());
|
DisplayInfoMessage(infostr.c_str());
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user