I've found a problem with an extension we installed for registering new customers via social networks. Every customer that registers through the extension gets the wrong
created_at date. We have our own registration module and that one works just fine.
My timezone is UTC -6, so we get something like this.
Current Time Displayed Stored (Admin panel) (Database) 2015-05-14 08:00 2015-05-14 08:00 2015-05-14 14:00 <<== our module (correct) 2015-05-14 08:00 2015-05-14 14:00 2015-05-14 20:00 <<== their module
It looks like the date is converted to UTC twice, so when it is converted back to GMT for display, it is off by 6 hours.
I read this question and found out it's a Magento bug. But how can I overcome this? Why is it working in my module and not in the third party extension? I looked into their code and could only find
$customer->save() being called once. I cannot set the correct date before saving since it will be overriden in the
_beforeSave method of the customer model and I also can't edit the core model class. I don't think I can subscribe to the
customerAfterSave event either since If I changed it there, the module that is currently working would be messed up.