timezonemagento2magento-rest-api

Magento 2.3.4 Different hour in REST API


I send request via REST API

https://www.mysite.pl/rest/V1/orders/89

And have date and time: "created_at": "2021-09-21 15:59:34",

When I go to Saels->Orders in admin there is different data and time: "Sep 21, 2021, 5:59:34 PM"

So there is a 2 hours difference. I think this cause a problem with my payment module. In admin timezone is set to CET Warsaw. Why in REST API call there is other time ?


Solution

  • I fixed this issue for me by selecting the "Coordinated Universal time" in admin: Store -> configuration -> General -> General -> Local Options enter image description here