2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 11:26:55 +00:00

statistics: bug fix - change of month

git-svn-id: https://svn.fhem.de/fhem/trunk@6795 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
tpoitzsch 2014-10-20 20:12:35 +00:00
parent 234dce12a9
commit a1403c432d

View File

@ -73,9 +73,9 @@ sub statistics_UpdateDevReading($$$$);
,["pressure", 4, 1]
,["rain", 2]
,["rain_rate", 1, 1]
,["rain_total", 2, 1]
,["rain_total", 2]
,["temperature", 1, 1]
,["total", 2, 2]
,["total", 2]
,["voltage", 1, 1]
,["wind", 5, 0]
,["wind_speed", 5, 1]
@ -268,7 +268,7 @@ statistics_PeriodChange($)
my $dayChangeTime = timelocal(0,0,0,$th[3],$th[4],$th[5]+1900);
if (AttrVal($name, "dayChangeTime", "00:00") =~ /(\d+):(\d+)/ && $1<24 && $1 >=0 && $2<60 && $2>=0) {
$dayChangeDelay = $1 * 3600 + $2 * 60;
if ($dayChangeDelay == 0) { $dayChangeDelay = 24*3600; }
if ($dayChangeDelay == 0) { $dayChangeTime += 24*3600; } # Otherwise it would always lay in the past
$dayChangeTime += $dayChangeDelay - $periodChangePreset;
}