API Date Results Not In UTC?

TriggermouseTriggermouse Member Posts: 5

Hello, I created a sale in my shop today at 08/29/2019 9:07 am my time (Mountain Time). I then made a request to the sale endpoint to retrieve this sale. I was expecting to see the "completeTime" date to show at UTC, however, it shows as my same local time "8/29/2019 9:07:37 AM".

I thought that all dates from the Lightspeed API were supposed to be in UTC? What am I missing here?

Best Answers

  • TriggermouseTriggermouse Member Posts: 5
    Accepted Answer

    Hey Gregarican, thanks for the quick reply! It's interesting, you are right, the raw JSON result of the return is showing the date just as you posted above, however when I when I deserialze the request into my object, it from the "2019-01-02T16:45:26+00:00" format to "2019-01-02 9:45:26", which is the correct local time, but not UTC like I want. So something is going on on my side that I need to figure out, thank you for helping point me in the right direction!

Sign In or Register to comment.