add use HTTP::Date for IsAdv Fn

This commit is contained in:
Marko Oldenburg 2020-12-10 09:39:30 +01:00
parent ba4d2203f4
commit bfeadd0bbf
2 changed files with 4 additions and 3 deletions

View File

@ -1,11 +1,11 @@
UPD 2020-11-20_11:26:01 97970 FHEM/73_AutoShuttersControl.pm
UPD 2020-11-20_11:27:18 97970 FHEM/73_AutoShuttersControl.pm
UPD 2020-11-20_11:21:11 74314 lib/FHEM/Automation/ShuttersControl.pm
UPD 2020-06-22_09:41:40 2657 lib/FHEM/Automation/ShuttersControl/Dev.pm
UPD 2020-07-26_17:36:29 2496 lib/FHEM/Automation/ShuttersControl/Roommate.pm
UPD 2020-08-12_11:00:05 31376 lib/FHEM/Automation/ShuttersControl/Shutters.pm
UPD 2020-11-09_06:58:59 25599 lib/FHEM/Automation/ShuttersControl/Shading.pm
UPD 2020-11-20_11:21:11 110071 lib/FHEM/Automation/ShuttersControl/EventProcessingFunctions.pm
UPD 2020-11-20_11:21:11 46052 lib/FHEM/Automation/ShuttersControl/Helper.pm
UPD 2020-12-10_09:36:29 46060 lib/FHEM/Automation/ShuttersControl/Helper.pm
UPD 2020-06-22_09:41:40 2175 lib/FHEM/Automation/ShuttersControl/Window.pm
UPD 2020-11-20_11:21:11 11742 lib/FHEM/Automation/ShuttersControl/Dev/Attr.pm
UPD 2020-07-03_11:29:10 7251 lib/FHEM/Automation/ShuttersControl/Dev/Readings.pm

View File

@ -1159,6 +1159,7 @@ sub PerlCodeCheck {
}
sub IsAdv {
use HTTP::Date;
my ( undef, undef, undef, $monthday, $month, $year, undef, undef, undef ) =
localtime( gettimeofday() );
my $adv = 0;
@ -1170,7 +1171,7 @@ sub IsAdv {
}
}
else {
my $time = HTTP::Date::str2time( $year . '-12-25' );
my $time = str2time( $year . '-12-25' );
my $wday = ( localtime($time) )[6];
$wday = $wday ? $wday : 7;
$time -= ( $FHEM::Automation::ShuttersControl::ascDev