From 14d61ba41961bbeae5ade9503aeeb152df6b93cb Mon Sep 17 00:00:00 2001 From: Sailor <> Date: Sun, 13 Nov 2022 19:24:40 +0000 Subject: [PATCH] 73_WaterCalculator: bugfix - 2nd DST bug, WFR Reading deleted git-svn-id: https://svn.fhem.de/fhem/trunk@26693 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/73_WaterCalculator.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/fhem/FHEM/73_WaterCalculator.pm b/fhem/FHEM/73_WaterCalculator.pm index 8b47b7687..5e0abe53c 100644 --- a/fhem/FHEM/73_WaterCalculator.pm +++ b/fhem/FHEM/73_WaterCalculator.pm @@ -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;