fix weekend bug
This commit is contained in:
parent
24f8ef7af0
commit
e58badf8cf
@ -44,7 +44,7 @@ use warnings;
|
||||
|
||||
|
||||
|
||||
my $version = "0.1.79.2";
|
||||
my $version = "0.1.79.3";
|
||||
|
||||
|
||||
sub AutoShuttersControl_Initialize($) {
|
||||
@ -1146,7 +1146,7 @@ sub ShuttersSunrise($$$) {
|
||||
|
||||
if( $tm eq 'unix' ) {
|
||||
if( $shutters->getUpMode eq 'astro') {
|
||||
if( (IsWe() or IsWeTomorrow()) and ascDev->getSunriseTimeWeHoliday($name) eq 'on' ) {
|
||||
if( (IsWe() or IsWeTomorrow()) and $ascDev->getSunriseTimeWeHoliday($name) eq 'on' ) {
|
||||
if( not IsWeTomorrow() ) {
|
||||
if( int(gettimeofday() / 86400) == int((computeAlignTime('24:00',sunrise_abs($autoAstroMode,0,$shutters->getTimeUpEarly,$shutters->getTimeUpLate)) + 1) / 86400) ) {
|
||||
$shuttersSunriseUnixtime = (computeAlignTime('24:00',sunrise_abs($autoAstroMode,0,$shutters->getTimeUpWeHoliday)) + 1);
|
||||
@ -1160,7 +1160,7 @@ sub ShuttersSunrise($$$) {
|
||||
$shuttersSunriseUnixtime = (computeAlignTime('24:00',sunrise_abs($autoAstroMode,0,$shutters->getTimeUpEarly,$shutters->getTimeUpLate)) + 1);
|
||||
}
|
||||
|
||||
if( defined($oldFuncHash) and ref($oldFuncHash) eq 'HASH' and (IsWe() or IsWeTomorrow()) and ascDev->getSunriseTimeWeHoliday($name) eq 'on' ) {
|
||||
if( defined($oldFuncHash) and ref($oldFuncHash) eq 'HASH' and (IsWe() or IsWeTomorrow()) and $ascDev->getSunriseTimeWeHoliday($name) eq 'on' ) {
|
||||
if( not IsWeTomorrow() ) {
|
||||
if( int(gettimeofday() / 86400) == int((computeAlignTime('24:00',sunrise_abs($autoAstroMode,0,$shutters->getTimeUpEarly,$shutters->getTimeUpLate)) + 1) / 86400) ) {
|
||||
$shuttersSunriseUnixtime = ($shuttersSunriseUnixtime + 86400)
|
||||
|
Loading…
Reference in New Issue
Block a user