Any time a product is updated and saved, its "created_at" entry in the "catalog_product_entity" database table is updated to the format YYYY-DD-MM, but it should keep it as YYYY-MM-DD. The date/time do not change, only the format. It isn't a big problem in itself, but it is creating problems when I attempt to sort products by creation date.

Here is an example:

  • created_at before: 2015-04-10 13:21:09 (YYYY-MM-DD)
  • edit and save product via Magento
  • created_at after: 2015-10-04 13:21:09 (YYYY-DD-MM)

Extra information: It is a Magento 1.9.1 store with the locale set to English (US) and timezone set to Los Angeles. The products from the store were originally imported via Magento's Import/Export feature from a wooCommerce store. Let me know if you need any more info.

  • Did you move your store from one server to another at some point? Commented May 31, 2015 at 16:07
  • Yes, quite recently. Commented Jun 1, 2015 at 6:11
  • Are you on share hosting or dedicated? Commented Jun 1, 2015 at 14:13
  • Shared server with cPanel. Commented Jun 1, 2015 at 19:37

1 Answer 1


you have to use


instead of


below is the solution.

open following file : app\code\core\Mage\Eav\Model\Entity\Attribute\Backend\Time\Created.php

and comment out beforeSave() function and replace with following function code.

  public function beforeSave($object)
    $attributeCode = $this->getAttribute()->getAttributeCode();

    $date = $object->getData($attributeCode);

    if (is_null($date)) {
        if ($object->isObjectNew()) {

            $object->setData($attributeCode, Varien_Date::now());
    } else {
        // convert to UTC
        $zendDate = Mage::app()->getLocale()->utcDate(null, $date, true, $this->_getFormat($date));

        // Replace -> $zendDate->getIso() with Mage::getModel('core/date')->gmtDate()
        $object->setData($attributeCode, Mage::getModel('core/date')->gmtDate());

    return $this;
  • This appears to change the created_at date to the time the product is updated. Commented Jun 10, 2015 at 20:10
  • Commenting out the entire else statement appears to solve the issue for me. Commented Jun 10, 2015 at 20:26
  • have you checked in database table what value is going there while commenting entire else statment ?
    – satish
    Commented Jun 11, 2015 at 13:37
  • If you comment out the else statement, the created_at value does not update after editing a product. Creating a new product adds the correct date to created_at. The only downside seems to be that you would need to make this change again if you update your Magento install, and your created_at dates will not update if you change your locale. Commented Jun 12, 2015 at 6:55

Your Answer

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

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