Skip to content

Commit

Permalink
OM PR 4339
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Nov 10, 2024
1 parent 1e9b268 commit 417dec4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/code/core/Mage/CatalogRule/Model/Resource/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ public function insertRuleData(Mage_CatalogRule_Model_Rule $rule, array $website

$customerGroupIds = $rule->getCustomerGroupIds();

$fromTime = (int) Mage::getModel('core/date')->gmtTimestamp(strtotime($rule->getFromDate()));
$toTime = (int) Mage::getModel('core/date')->gmtTimestamp(strtotime($rule->getToDate()));
$fromTime = (int) Mage::getModel('core/date')->gmtTimestamp(strtotime((string) $rule->getFromDate()));
$toTime = (int) Mage::getModel('core/date')->gmtTimestamp(strtotime((string) $rule->getToDate()));
$toTime = $toTime ? ($toTime + self::SECONDS_IN_DAY - 1) : 0;

$timestamp = time();
Expand Down

0 comments on commit 417dec4

Please sign in to comment.