I am trying to make special price dependent to time on frontend. I have already managed to save the date with time on backend and inside data table catalog_product_entity_datetimethanks to this post using time in special price from/to

The problem is that the price is not changing after the time is reached. It only reads the date and so the prices only changes back to normal after 00:00:00 next day, as normal.

I could not find the controller responsible for this on "Mage_Catalog_block_Price"

Does anyone have an idea where is this controlled and how can I make the special price dependent on time?

Any help is welcome



  • It probably has to do with Mage_Catalog_Model_Resource_Product_Indexer_Price_Default getDatePartSql(), how can I get full date and time from this, not only date
    – Gabriel G
    Apr 11, 2018 at 20:42

1 Answer 1


FINALLY. I could make special price to work absolutely depending on time.

Inside app\code\core\Mage\Core\Model\Locale.php

there is a function called isStoreDateInInterval. Inside this function find:

if ($dateTo) {
            // fix date YYYY-MM-DD 00:00:00 to YYYY-MM-DD 23:59:59
            $toTimeStamp += 86400;

Comment out this lines and the price is going to update correctly depending on the time stored in database. I still do not know the downside if any date is stored without time, but it does not seem to be a problem.

To make it possible to store time in database refer to linked post.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.