3

I am fetching the orders using Magento 2 REST api services. I am using IST timezone the dates saved in the database are in correct timezone. I have set timezone to "Asia/Kolkata". On customer dashboard and in admin panel orders pages dates are getting displayed in IST. But when I fetch the order using the REST api I am getting the dates in UTC timezone.

"created_at": "2017-08-11 06:04:18" this is what I am getting for created at in response.

2017-08-11 11:34:18 this is what the actual time is saved in database.

Can someone help me here to get the created time in correct timezone?

  • Hi, have you solved this situation? I'm facing same issue here. – lpFranz Sep 5 '18 at 12:01
0

So it looks like the API always returns the dates in UTC, which is nice if you know it's going to do that, because you can always count on the date being UTC no matter what the magento configuration is set to or changed to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.