mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
abstime2rel fix for "00:00:00"
git-svn-id: https://svn.fhem.de/fhem/trunk@765 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
33c46c0d18
commit
759e28256d
@ -44,11 +44,9 @@ abstime2rel($)
|
||||
my @now = localtime;
|
||||
my $t2 = 3600*$now[2]+60*$now[1]+$now[0];
|
||||
my $diff = $t1-$t2;
|
||||
$diff += 86400 if($diff < 0);
|
||||
$diff += 86400 if($diff <= 0);
|
||||
|
||||
return sprintf("%02d:%02d:%02d", $diff/3600, ($diff/60)%60, $diff%60);
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user