mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fixed the get_time() out put fixed. Tweaked my changes made a tighter code.
This commit is contained in:
parent
135a095656
commit
b10268ca95
@ -96,21 +96,15 @@ function get_uptime() {
|
||||
$uptimestr .= "1 Day ";
|
||||
|
||||
if ($uphours > 1)
|
||||
$hours = "Hours";
|
||||
else if ($uphours > 0)
|
||||
$hours = "Hour";
|
||||
|
||||
$hours = "s";
|
||||
|
||||
if ($upmins > 1)
|
||||
$minutes = "Minutes";
|
||||
else if ($uphours > 0)
|
||||
$minutes = "Minute";
|
||||
|
||||
$minutes = "s";
|
||||
|
||||
if ($upmins > 1)
|
||||
$seconds = "Seconds";
|
||||
else if ($uphours > 0)
|
||||
$seconds = "Second";
|
||||
|
||||
$uptimestr .= sprintf("%02d $hours %02d $minutes %02d $seconds", $uphours, $upmins, $upsecs);
|
||||
$seconds = "s";
|
||||
|
||||
$uptimestr .= sprintf("%02d Hour$hours %02d Minute$minutes %02d Second$seconds", $uphours, $upmins, $upsecs);
|
||||
return $uptimestr;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user