I'm trying to create a collection of all products that have been updated in my store the past 24 hours.
The following code seems to be ok to me. Although I have tried numerous altering versions of it, the collection always ends up with 0 products.
$now = date('Y-m-d H:i:s', time()); $last_allowed_update = date('Y-m-d H:i:s', strtotime($now.'- 24 hours') ); $productCollection = Mage::getResourceModel('catalog/product_collection'); $productCollection->addAttributeToSelect('*'); $productCollection->addAttributeToFilter('updated_at', array('from'=>$last_allowed_update));