2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

RESIDENTStk: fix warning

git-svn-id: https://svn.fhem.de/fhem/trunk@14047 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2017-04-20 18:59:17 +00:00
parent 44f04083c8
commit f5471078ee

View File

@ -3269,18 +3269,22 @@ sub RESIDENTStk_wakeupGetNext($;$) {
$definitiveNextTomorrow += $wakeupOffset * 60
if ( defined($definitiveNextTomorrow) );
if ( $definitiveNextToday >= 86400 ) {
$definitiveNextToday -= 86400;
# correct change over midnight
if ( defined($definitiveNextToday) ) {
if ( $definitiveNextToday >= 86400 ) {
$definitiveNextToday -= 86400;
}
elsif ( $definitiveNextToday < 0 ) {
$definitiveNextToday += 86400;
}
}
elsif ( $definitiveNextToday < 0 ) {
$definitiveNextToday += 86400;
}
if ( $definitiveNextTomorrow >= 86400 ) {
$definitiveNextTomorrow -= 86400;
}
elsif ( $definitiveNextTomorrow < 0 ) {
$definitiveNextTomorrow += 86400;
if ( defined($definitiveNextTomorrow) ) {
if ( $definitiveNextTomorrow >= 86400 ) {
$definitiveNextTomorrow -= 86400;
}
elsif ( $definitiveNextTomorrow < 0 ) {
$definitiveNextTomorrow += 86400;
}
}
}
}