diff --git a/app/code/core/Mage/SalesRule/Model/Validator.php b/app/code/core/Mage/SalesRule/Model/Validator.php index 033beb4dc48..32589269987 100644 --- a/app/code/core/Mage/SalesRule/Model/Validator.php +++ b/app/code/core/Mage/SalesRule/Model/Validator.php @@ -179,7 +179,12 @@ protected function _canProcessRule($rule, $address) return false; } // check coupon expiration - if ($coupon->hasExpirationDate() && ($coupon->getExpirationDate() < Mage::getModel('core/date')->date())) { + $couponExpirationDay = null; + if ($coupon->hasExpirationDate()) { + $couponExpirationDay = Mage::getModel('core/date')->date(Varien_Date::DATE_PHP_FORMAT, $coupon->getExpirationDate()); + } + $today = Mage::getModel('core/date')->date(Varien_Date::DATE_PHP_FORMAT); + if ($couponExpirationDay !== null && ($couponExpirationDay < $today)) { $rule->setIsValidForAddress($address, false); return false; }