Skip to content

Commit fdd06db

Browse files
authored
Fixe bug 4069
fix bug on created_at in customer_entity table on update
1 parent 93288c0 commit fdd06db

File tree

1 file changed

+12
-1
lines changed
  • app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Time

1 file changed

+12
-1
lines changed

app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Time/Created.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,22 @@ public function beforeSave($object)
5353
} else {
5454
// convert to UTC
5555
$zendDate = Mage::app()->getLocale()->utcDate(null, $date, true, $this->_getFormat($date));
56-
$object->setData($attributeCode, $zendDate->getIso());
56+
$date = $this->removeTimezone($zendDate->getIso());
57+
$object->setData($attributeCode, $date);
5758
}
5859

5960
return $this;
6061
}
62+
63+
/**
64+
* @param $date
65+
*
66+
* @return string
67+
*/
68+
public function removeTimezone($date): string
69+
{
70+
return strtr($date, ["+00:00" => "", "T" => " "]);
71+
}
6172

6273
/**
6374
* Convert create date from UTC to current store time zone

0 commit comments

Comments
 (0)