Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the bug on created_at in the customer_entity table on update #4070

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
"code"
]
},
{
"login": "sdecalom",
"name": "Sebastien DECALOM",
"avatar_url": "https://avatars.githubusercontent.com/u/3275377?s=96&v=4",
"profile": "https://github.com/sdecalom",
"contributions": [
"code"
]
}
{
"login": "LeeSaferite",
"name": "Lee Saferite",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,23 @@ public function beforeSave($object)
} else {
// convert to UTC
$zendDate = Mage::app()->getLocale()->utcDate(null, $date, true, $this->_getFormat($date));
$object->setData($attributeCode, $zendDate->getIso());
fballiano marked this conversation as resolved.
Show resolved Hide resolved
$date = $this->removeTimezone($zendDate->getIso());
$object->setData($attributeCode, $date);
}

return $this;
}

fballiano marked this conversation as resolved.
Show resolved Hide resolved
/**
* Remove the timezone format
*
* @param string $date
* @return string
*/
public function removeTimezone($date): string
{
return strtr($date, ["+00:00" => "", "T" => " "]);
}

/**
* Convert create date from UTC to current store time zone
Expand Down
Loading