From c0a5bd18a58013ca73727c4cfe68e2acaa55fa3d Mon Sep 17 00:00:00 2001 From: tpoitzsch <> Date: Fri, 6 Jun 2014 04:21:44 +0000 Subject: [PATCH] bugfix git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@6075 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/98_statistics.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/FHEM/98_statistics.pm b/FHEM/98_statistics.pm index ad1226b50..d5fef6284 100644 --- a/FHEM/98_statistics.pm +++ b/FHEM/98_statistics.pm @@ -632,10 +632,13 @@ statistics_doStatisticDelta ($$$$$) if ($showDate >= 6) { # Shows the "since:" value for the first day change $showDate = 5; $last[9] = $stat[9]; - # Next monthly and yearly values start at 00:00 and show only date (no time) - $stat[5] = 0; - $stat[7] = 0; - $stat[9] = strftime "%Y-%m-%d", localtime(); # start + # Next monthly and yearly values start normaly at 00:00 and show only date (no time) + if (AttrVal($name, "dayChangeTime", "00:00") =~ /00:00|0:00/) { + my $periodChangePreset = AttrVal($name, "periodChangePreset", 5); + $stat[5] = 0; + $stat[7] = 0; + $stat[9] = strftime "%Y-%m-%d", localtime(gettimeofday()+$periodChangePreset); # start + } } Log3 $name,4,"$name: Shifting current day in last value of '$statReadingName'."; }