2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

76_SMAPortal: contrib 3.6.0

git-svn-id: https://svn.fhem.de/fhem/trunk@22951 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2020-10-10 19:17:17 +00:00
parent aa952de1cf
commit 8c35635abf

View File

@ -1536,7 +1536,8 @@ sub _getBalanceDayData { ## no critic "not used"
$m -= 1;
} else {
my $time = subDays ($bal);
my $mp = (split "-", $rel)[1] // 0; # Multiplikator: z.B. current-1 -> 1
my $time = time - ($mp * 86400);
(undef,undef,undef,$d,$m,$y) = localtime($time);
$addon .= "_".($y+1900)."-".sprintf("%02d",($m+1))."-".sprintf("%02d",$d);
@ -2997,20 +2998,6 @@ sub deleteData {
return;
}
################################################################
# Anzahl Tagesverschiebungen ermitteln und
# effektive Zeit zurückliefern
# $rel = Relativzeit: current current-1 current-3
################################################################
sub subDays {
my $rel = shift;
my $mp = (split "-", $rel)[1] // 0; # Multiplikator: z.B. current-1 -> 1
my $time = time - ($mp * 86400);
return $time;
}
################################################################
# statistische Counter managen
# $name = Name Device