public function addWhereClause(&$model, Zend_Db_Select &$select) {
        $statusColumn = $model->getAdapter()->quoteIdentifier(self::STATUS_COLUMN);
        $publishedColumn = $model->getAdapter()->quoteIdentifier(self::PUBLISHED_COLUMN);

        if ($this->_modelAlias) {
            $modelAlias = $this->_modelAlias;
            $modelAlias = $model->getAdapter()->quoteIdentifier($modelAlias);
            $statusColumn = "$modelAlias.$statusColumn";
            $publishedColumn = "$modelAlias.$publishedColumn";
        }

        // Add online_status check
        $select->where($statusColumn . ' = ?', self::ONLINE);

        // Add published check
        if ($this->_config['draft_only']) {
            return;
        }

        $ini = Zend_Registry::get('config');
        $timezone = !empty($ini->resources->db->params->timezone) ?
            $ini->resources->db->params->timezone : null;
        $timecalc = '';
        if ($timezone == 'GMT' || $timezone == 'UTC') {
            $dstStart = strtotime('Last Sunday of March');
            $dstEnd   = strtotime('Last Sunday of October');
            $now      = time();
            $daylightSavingsTime = $now > $dstStart && $now < $dstEnd;

            $timecalc = '+ INTERVAL';
            if ($daylightSavingsTime) {
                $timecalc .= ' 2 HOUR';
            } else {
                $timecalc .= ' 1 HOUR';
            }
        }
        $select->where(
            $publishedColumn . ' IS NULL OR ' . $publishedColumn . ' <= NOW() ' . $timecalc
        );
    }