cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.2.6 Fix system returns incorrect time

Magento 2.2.6 Fix system returns incorrect time

Magento, sometimes the system returns incorrect time even when you have configured the correct timezone in your backend.

 

Someone has solved this problembung.png

2 REPLIES 2

Re: Magento 2.2.6 Fix system returns incorrect time

Hi @yeison_flores,

Can you give some examples that where are you getting wrong datetime?

Check the code as well, if date is directly fetched from the database without using locale function, then it shows wrong data, it shows the same data which it have in the database.

You can also compare the value with the database as well to make sure the issue.

Re: Magento 2.2.6 Fix system returns incorrect time

Vimal Parihar

 I have the exact same issue on Magento 2.2.6 The server, php and mysql time are set to America/Lima. In the backend the locale is set to America/Lima However the time difference is 5 hours.

 

Example:

I live in KY US (Eastern Time UTC-05:00).

My customers are mostly from the US.

My server is in Phoenix AZ (Mountain Time UTC-07:00).

If I want to try to equal out the time as best as possible for US customers, would setting the Locale setting in Magento to something like Chicago be best or to my KY time or the server time?