mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 16:39:29 -05:00
made friendly time unit returns empty string when time is 0. Fixes 46y display in search dialog
This commit is contained in:
parent
9d8690bb73
commit
8de9ee8b8d
@ -209,6 +209,9 @@ QString misc::userFriendlyDuration(qlonglong seconds)
|
||||
|
||||
QString misc::timeRelativeToNow(uint32_t mtime)
|
||||
{
|
||||
if(mtime == 0)
|
||||
return QString();
|
||||
|
||||
time_t now = time(NULL) ;
|
||||
if(mtime > now)
|
||||
return misc::userFriendlyDuration(mtime - (int)now) + " (ahead of now)";
|
||||
|
Loading…
Reference in New Issue
Block a user