captive: Redesign generated coupons table

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2017-05-01 11:26:04 +01:00
parent 733932de74
commit a0b271e474
12 changed files with 72 additions and 43 deletions

View File

@@ -235,7 +235,13 @@ sub writehashpart
sub age {
my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size,
$atime, $mtime, $ctime, $blksize, $blocks) = stat $_[0];
my $totalsecs = time() - $mtime;
my $t = time() - $mtime;
return &format_time($t);
}
sub format_time($) {
my $totalsecs = shift;
my @s = ();
my $secs = $totalsecs % 60;