|
$new_from = $this->_localeDate->date(new \DateTime($from),null,false,false)->setTime(0, 0, 0)->format('Y-m-d H:i:s');
$new_to = $this->_localeDate->date(new \DateTime($to),null,false,false)->setTime(23, 59, 59)->format('Y-m-d H:i:s');
if(strtotime($new_to)>strtotime($new_from)){
$this->_collection->addFieldToFilter('created_at',['from'=>$new_from,'to'=>$new_to]);
}
|
|