cancel
Showing results for 
Search instead for 
Did you mean: 

Timezone configuration problems

Timezone configuration problems

I'm having some trouble with the timezone settings. When I create a new order the time is shown in UTC in the admin (both in the grid and in the order itself), in the frontend, and in the confirmation e-mail. The problem is my store is setup for the CEST timezone under Stores -> Configuration -> General -> Locale Options -> Timezone.

 

The `created_at` column in the database shows the time in CEST.

MySQL prints the time in CEST when I use the now() function.

The server responds to 'date' with the time in CEST.

PHP has date.timezone set to CEST but the default timezone is UTC (automatically set by Magento)

PHP date() function responds with the time in CEST.

 

What exactly am I missing? Why is everything in CEST yet the orders are shown in UTC everywhere except the database itself?

 

Magento CE 2.2.6

Linux CentOS 7

PHP 7.0.27

MariaDB 10.2.12

 

Any help would be appreciated.

2 REPLIES 2

Re: Timezone configuration problems

Hello @ddpfl

 

However, Magento 2 expects to see it in UTC and that's good if your server/database timezone in UTC, but if it's not, you would get this issue.

So please make sure that system stores data in UTC in your database. If not, please make it so, and then Magento 2 would work with dates as expected.

 

Please check below link for your ref:

https://github.com/magento/magento2/issues/7560

https://github.com/magento/magento2/issues/3028

Manish Mittal
https://www.manishmittal.com/

Re: Timezone configuration problems


 I got same issue.
 I checked server and Updated .

 

  • Syncing of the clock from NTP is disabled. Now it is synchronized and time now is correct
     
    Thanks