2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-25 03:44:52 +00:00

73_WaterCalculator: bugfix - 2nd DST bug, WFR Reading deleted

git-svn-id: https://svn.fhem.de/fhem/trunk@26693 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Sailor 2022-11-13 19:24:40 +00:00
parent e8e667f78f
commit 03c3d3a4e4

View File

@ -152,8 +152,8 @@ sub WaterCalculator_Define($$$)
### Start timer for execution around midnight
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
my $EpochThisMidnight = timelocal(0,0,0,$mday ,$mon,$year);
my $EpochNextMidnight = timelocal(0,0,0,$mday+1,$mon,$year);
my $EpochThisMidnight = Time::Local::timelocal_nocheck(0,0,0,$mday ,$mon,$year);
my $EpochNextMidnight = Time::Local::timelocal_nocheck(0,0,0,$mday+1,$mon,$year);
my $SecondsToday = $EpochNextMidnight - $EpochThisMidnight;
$hash->{system}{SecondsToday} = $SecondsToday;
InternalTimer($EpochNextMidnight, "WaterCalculator_MidnightTimer", $hash, 0);
@ -605,8 +605,8 @@ sub WaterCalculator_MidnightTimer($)
### Start timer for execution around midnight
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
my $EpochThisMidnight = timelocal(0,0,0,$mday ,$mon,$year);
my $EpochNextMidnight = timelocal(0,0,0,$mday+1,$mon,$year);
my $EpochThisMidnight = Time::Local::timelocal_nocheck(0,0,0,$mday ,$mon,$year);
my $EpochNextMidnight = Time::Local::timelocal_nocheck(0,0,0,$mday+1,$mon,$year);
my $SecondsToday = $EpochNextMidnight - $EpochThisMidnight;
$WaterCalcDev->{system}{SecondsToday} = $SecondsToday;
InternalTimer($EpochNextMidnight, "WaterCalculator_MidnightTimer", $WaterCalcDev, 0);
@ -977,8 +977,8 @@ sub WaterCalculator_Notify($$)
### Recalculate new dayspan in seconds
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
my $EpochThisMidnight = timelocal(0,0,0,$mday ,$mon,$year);
my $EpochNextMidnight = timelocal(0,0,0,$mday+1,$mon,$year);
my $EpochThisMidnight = Time::Local::timelocal_nocheck(0,0,0,$mday ,$mon,$year);
my $EpochNextMidnight = Time::Local::timelocal_nocheck(0,0,0,$mday+1,$mon,$year);
my $SecondsToday = $EpochNextMidnight - $EpochThisMidnight;
$WaterCalcDev->{system}{SecondsToday} = $SecondsToday;