mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-01 01:09:47 +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:
parent
5d4727fb28
commit
fe76f9e923
@ -966,19 +966,22 @@ sub statistics_getStoredDevices ($)
|
||||
########################################
|
||||
sub statistics_FormatDuration($)
|
||||
{
|
||||
my ($value) = @_;
|
||||
#Tage
|
||||
my $returnstr ="";
|
||||
if ($value >= 86400) { $returnstr = sprintf "%dd ", int($value/86400); }
|
||||
# Stunden
|
||||
$value %= 86400;
|
||||
$returnstr .= sprintf "%02d:", int($value/3600);
|
||||
$value %= 3600;
|
||||
$returnstr .= sprintf "%02d:", int($value/60);
|
||||
$value %= 60;
|
||||
$returnstr .= sprintf "%02d", $value;
|
||||
|
||||
return $returnstr;
|
||||
my ($value) = @_;
|
||||
#Tage
|
||||
my $returnstr ="";
|
||||
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;
|
||||
}
|
||||
|
||||
########################################
|
||||
|
Loading…
Reference in New Issue
Block a user