diff --git a/application/models/Survey.php b/application/models/Survey.php index 0d8f48d2707..430a09866b3 100644 --- a/application/models/Survey.php +++ b/application/models/Survey.php @@ -127,7 +127,7 @@ public function scopes() { return array( 'active' => array('condition' => "active = 'Y'"), - 'open' => array('condition' => '(startdate > :now OR startdate IS NULL) AND (expires < :now OR expires IS NULL)', 'params' => array( + 'open' => array('condition' => '(startdate <= :now OR startdate IS NULL) AND (expires >= :now OR expires IS NULL)', 'params' => array( ':now' => dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", Yii::app()->getConfig("timeadjust")) )), 'public' => array('condition' => "listpublic = 'Y'"),