cancel
Showing results for 
Search instead for 
Did you mean: 

Created Date Issue: On Creation, sometime swapping Month and Day

Created Date Issue: On Creation, sometime swapping Month and Day

Greetings!

 

We seem to have an an issue where Magento is saving an incorrect created_at date to the DB.  It appears that on days near the beginning of the month (<= the 12th), the creation date is sometimes saving to the DB with the month and the day swapped.  So, for instance, a Product is added on March 6th, 2015, and the created_at date is saved as 2015-06-03 (June, 3rd).  

 

Upon researching we've seen others suggest that this had been an ongoing issue with Magento Entities in general that get a created_at date.   On magento.stackexchange, there is a suggestion for a fix that basically entails calling the strtotime() on the $date variable in beforeSave() and afterLoad() in Created.php

We have gone ahead with this fix for now, but I am wondering 

A) is this a known bug in Magento 1.9.1 and if so, are there plans to address it

B) have other folks used this fix as well, and has it been sucessful?

C) Why would this fix work, what's happening in there that's causing this swap only sometimes, not everytime?

 

Thanks for any help!

 

 

 

4 REPLIES

Re: Created Date Issue: On Creation, sometime swapping Month and Day

I've been told there might be a patch to fix this issue: PATCH_SUPEE-3987. I'm looking into it.

Re: Created Date Issue: On Creation, sometime swapping Month and Day

What did you find out?  We are experiencing this on a random nature

Re: Created Date Issue: On Creation, sometime swapping Month and Day

Hi - Wish I could help, but we never got to the bottom of the issue.  Nor did we ever find out anything else about it.  The fix at the link above (in my first post) seems to have stopped it from happening again though.   Simple enough too.  Might as well slide it in there until Magento offers some future patch...

Re: Created Date Issue: On Creation, sometime swapping Month and Day

Greetings,

 

We are also facing the same problem, but we do not have that techincal expertise to change the code. we will really appreciate if somone post the steps by steps instructions for those who do not have technical background. Or a generic module can also be shared to help community.

 

We appreciate all the help from community member regarding this issue. 

Hope to hear soon!