Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

incorrect time in the data base after make an order
 
gryfja
Jr. Member
 
Total Posts:  15
Joined:  2009-01-07
 

Hi, I’ve got a problem with incorrect time in magento database in the table ‘ma_sales_order’ in the column created_at
Can anyone tell me why and what should i need to do?
An Order was made for example 8pm and in the data base i’ve got in the column ‘created_at’ time 6pm and it is two hours two to earlier
thx

 
Magento Community Magento Community
Magento Community
Magento Community
 
Olivier PEPIN
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2008-03-06
 

+1 on the same issue.
I found some corresponding post on the forum - but no anwers yet http://www.magentocommerce.com/boards/viewthread/22694/

I agree on the analysis that Magento is saving all this dates in UTC(GMT) - saving all dates in the same timezone is probably good for multi-store, multi-timezone setup.

Store 1 in PST (GMT+8 / summer time) - order at 10:30 (local time)
Store 2 in a different timezone (EST) - order at 13:30 (local time)

2 orders are saved in database as 17:30 (that correspond to UTC)
Even if system in GMT+1 summer time (19:30)

What you would expect according to MySQL datetime definition is all dates be stored with SYSTEM (GMT+2 - 19:30) in the database and not UTC.
http://dev.mysql.com/doc/refman/5.1/en/datetime.html
If you compare the database entry with “now()” you will get X hours difference (2 if your system is ... that’s not good.)

The simplest solution is to set your server or database to be in UTC to have no inconsistencies ... until magento fix the the issue and store all dates in the database system timezone - or acknowledge the fact that are UTC time and be carefull when accessing that results…

Cheeers,
Olivier

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top