]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - config/cfgroot/general-functions.pl
captive: Redesign generated coupons table
[ipfire-2.x.git] / config / cfgroot / general-functions.pl
index f448c34befc7cf8af483f674f02665c0203d6a54..0577afe2809e62b3de113f96b3819ab04a43d917 100644 (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;