[FIX] correct remaining time calculation if time is after midnoght
This commit is contained in:
parent
b0a675ab3d
commit
e31b31e6f7
|
@ -82,7 +82,7 @@ class LightStatus {
|
|||
$this->changeTime = (int)(($stopTime - $currentTime) / 60);
|
||||
$this->waitTime = 1;
|
||||
return true;
|
||||
} elseif ($currentTime < $startTime || ($startTime+(24*60*60) - $currentTime) < (12*60*60) ) {
|
||||
} elseif ( ($startTime - $currentTime) < (12*60*60) || ($startTime+(24*60*60) - $currentTime) < (12*60*60) ) {
|
||||
// right before the next time interval
|
||||
$this->state = false;
|
||||
if ($currentTime < $startTime) {
|
||||
|
|
Reference in a new issue