cancel
Showing results for 
Search instead for 
Did you mean: 

Can't set a timezone

Can't set a timezone

Hi my M2.2.3 CE seems to be ignoring the timezone setting.

Stores -> General -> Locale option -> Timezone is set to my current timezone.

My php.ini's in both php7.1-cli and php7.1-fpm folders are also set to my timezone, thus phpinfo() also shows my timezone.

 

So when I make an API PUT call, and updating a product, all changes take effect accordingly, however the "updated_at" field being filled with GMT timezone, and not my current timezone. And API PUT call I make does not include any time-related data in the payload at all.

So I presume, Magento 2 automatically sets its current wrong GMT datetime for some reason

 

So how do I set correct timezone in Magento 2.2.3 CE?

 

Thank you.

 

UPDATE
I noticed this line in app/bootstrap.php file:

date_default_timezone_set('UTC');

Can this be a reason? And if so, why wasn't it updated with my settings in admin area?

1 REPLY 1

Re: Can't set a timezone

Hi @overjolted,


I don't have a clear answer (and I haven't saw that error yet) but maybe you can check this link: https://support.hypernode.com/knowledgebase/magento-utc-hypernode/