mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 08:59:37 -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)
|
QString misc::timeRelativeToNow(uint32_t mtime)
|
||||||
{
|
{
|
||||||
|
if(mtime == 0)
|
||||||
|
return QString();
|
||||||
|
|
||||||
time_t now = time(NULL) ;
|
time_t now = time(NULL) ;
|
||||||
if(mtime > now)
|
if(mtime > now)
|
||||||
return misc::userFriendlyDuration(mtime - (int)now) + " (ahead of now)";
|
return misc::userFriendlyDuration(mtime - (int)now) + " (ahead of now)";
|
||||||
|
Loading…
Reference in New Issue
Block a user