2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 07:19:24 +00:00

statistics: change from 1d to 24:00:00

git-svn-id: https://svn.fhem.de/fhem/trunk@7236 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
tpoitzsch 2014-12-16 18:37:55 +00:00
parent 5d4727fb28
commit fe76f9e923

View File

@ -969,15 +969,18 @@ sub statistics_FormatDuration($)
my ($value) = @_;
#Tage
my $returnstr ="";
if ($value >= 86400) { $returnstr = sprintf "%dd ", int($value/86400); }
if ($value > 86400) { $returnstr = sprintf "%dd ", int($value/86400); }
# Stunden
if ($value == 86400) {
$returnstr = "24:00:00";
} else {
$value %= 86400;
$returnstr .= sprintf "%02d:", int($value/3600);
$value %= 3600;
$returnstr .= sprintf "%02d:", int($value/60);
$value %= 60;
$returnstr .= sprintf "%02d", $value;
}
return $returnstr;
}