fix bug then IsWe or IsWeTomorrow

This commit is contained in:
Marko Oldenburg 2019-05-28 08:39:52 +02:00
parent 368fb7faad
commit 7513c3470e

View File

@ -3130,8 +3130,7 @@ sub ShuttersSunrise($$) {
{
if ( not IsWeTomorrow() ) {
if (
IsWe()
and int( gettimeofday() / 86400 ) == int(
int( gettimeofday() / 86400 ) == int(
computeAlignTime( '24:00',
$shutters->getTimeUpWeHoliday ) / 86400
)
@ -3146,11 +3145,12 @@ sub ShuttersSunrise($$) {
computeAlignTime( '24:00',
$shutters->getTimeUpEarly ) / 86400
)
and $shutters->getSunrise
)
{
$shuttersSunriseUnixtime =
computeAlignTime( '24:00',
$shutters->getTimeUpWeHoliday );
$shutters->getTimeUpEarly ) + 86400;
}
else {
$shuttersSunriseUnixtime =
@ -3182,6 +3182,17 @@ sub ShuttersSunrise($$) {
computeAlignTime( '24:00',
$shutters->getTimeUpEarly );
}
elsif (
int( gettimeofday() / 86400 ) != int(
computeAlignTime( '24:00',
$shutters->getTimeUpWeHoliday ) / 86400
)
)
{
$shuttersSunriseUnixtime =
computeAlignTime( '24:00',
$shutters->getTimeUpWeHoliday );
}
else {
$shuttersSunriseUnixtime =
computeAlignTime( '24:00',