Magento API returns dates in what timezone
Asked Answered
B

1

7

I have been trying to find the answer to this for several hours... what timezone does the Magento API use? I am assuming that the Magento API returns all date values as GMT time because they do not append the timezone string at the end of the data. Is this correct?

I am wanting to use filters and want to make sure that the dates are being correctly interpreted in my offsite client.

Blankly answered 29/3, 2011 at 1:15 Comment(0)
T
7

From my experience, all dates in Magento seem to be stored in GMT. You should be able to confirm this trivially in any particular case by adding a record at a known time and calculating the offset.

Togliatti answered 29/3, 2011 at 2:40 Comment(2)
I have test servers to work with, but the end product will use client servers that I have no control over. As long as Magento API always returns GMT its not a problem because I can convert local time... but if each Magento server stores time at its local time, there doesn't appear to be a way to get the current time in the server in order to offset to local time.Blankly
I've just run into this myself and performed my own test. API dates are always in GMT regardless of the server's timezone (assuming the store's locale is set correctly in admin, which is easy to check).Dyan

© 2022 - 2024 — McMap. All rights reserved.