This is pretty cool. I didnt create this, just found it and tried it. Try this. Functions.php
add this function
///ELAPSED TIME SINCE TORRENT WAS UPLOADED
function get_time_elapsed($datetime, $full = false)
{
$now = new DateTime;
$ago = new DateTime($datetime);
$diff = $now->diff($ago);
$diff->w = floor($diff->d / 7);
$diff->d -= $diff->w * 7;
$string = array(
'y' => 'year',
'm' => 'month',
'w' => 'week',
'd' => 'day',
'h' => 'hour',
'i' => 'minute',
's' => 'second',
);
foreach ($string as $k => &$v)
{
if ($diff->$k)
{
$v = $diff->$k . ' ' . $v . ($diff->$k > 1 ? 's' : '');
}
else
{
unset($string[$k]);
}
}
if (!$full) $string = array_slice($string, 0, 1);
return $string ? implode(', ', $string) . ' ago' : 'just now';
}
///END ELAPSE TIME
find
case 'added':
print("<td class='ttable_col$x' align='center'>".date("n-d-Y g:i a", utc_to_tz_time($row['added']))."</td>");
break;
change to (I keep old code commented out in case there is a need to revert back)
case 'added':
// print("<td class='ttable_col$x' align='center'>".date("n-d-Y g:i a", utc_to_tz_time($row['added']))."</td>");
print("<td class='ttable_col$x' align='center'>".get_time_elapsed($row['added'])."</td>");
break;
[ATTACH type="full" alt="Capture.PNG"]5476[/ATTACH]
Capture.PNG
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)