mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
COPKGManager: generate a readable string for installation time
Origin commit data
------------------
Commit: 33135a5bc5
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-03-02 (Wed, 02 Mar 2016)
This commit is contained in:
@@ -174,6 +174,16 @@ int COPKGManager::exec(CMenuTarget* parent, const string &actionKey)
|
||||
//show package info...
|
||||
bool is_installed = pkg_vec[selected]->installed;
|
||||
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());
|
||||
return res;
|
||||
}
|
||||
|
Reference in New Issue
Block a user