From: Michael Tremer Date: Sat, 27 Apr 2024 11:59:03 +0000 (+0200) Subject: connections.cgi: Use &General::format_time() X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aaa9c561c1101155be48e99837f8e85c6e12ae65;p=people%2Fmfischer%2Fipfire-2.x.git connections.cgi: Use &General::format_time() Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/connections.cgi b/html/cgi-bin/connections.cgi index 4bd4c6057..69d89f51c 100644 --- a/html/cgi-bin/connections.cgi +++ b/html/cgi-bin/connections.cgi @@ -484,7 +484,7 @@ foreach my $line () { my $dst_flag_icon = &Location::Functions::get_flag_icon($dstccode); # Format TTL - $ttl = format_time($ttl); + $ttl = &General::format_time($ttl); my $sip_extra; if ($sip_ret && $sip ne $sip_ret) { @@ -582,21 +582,6 @@ print ""; &Header::closebigbox(); &Header::closepage(); -sub format_time($) { - my $time = shift; - - my $seconds = $time % 60; - my $minutes = $time / 60; - - my $hours = 0; - if ($minutes >= 60) { - $hours = $minutes / 60; - $minutes %= 60; - } - - return sprintf("%3d:%02d:%02d", $hours, $minutes, $seconds); -} - sub ipcolour($) { my $id = 0; my $colour = ${Header::colourred};