Date format changed unexpectedly


It seems that the format of date and time objects returned by the GraphQL API has changed unexpectedly. Previously, datetimes were formatted like so:


Now, however, they are formatted without the timezone offset, like so:


Request ID for an example request that I just made to confirm this: 5fada9583368b04092aeb292

Please advise whether this change is intentional or not.

Hi @jfmontanaro!
Are you currently still seeing this format change?

The reason I ask is that I tried the Query and getting:

"order_date": "2020-09-21T13:51:46+00:00",

I will ask around and check with our team to confirm that there haven’t been any changes that might have caused this.

Thanks for reporting this!

Hi @jfmontanaro!
I just got back a response from our engineers, in that case, the timezone offset will always be +00:00 because we always display dates in UTC (which means that it will always display as +00:00)
There was a change, in fact, that then was rolled back, but will this change be causing you any issue?
Thanks again!

Hi Tomas,

It did cause some issues, as we had some code in place that attempted to parse the timestamp with the offset present, and it broke when the offset was missing. We have since updated this code to handle either format. It might be nice if in the future there were a bit of warning before the API response format were to change.

You are absolutely right about that @jfmontanaro I apologize for that.
We where not hoping to change that now, we are working on some improvements and this change accidentally slipped into production.
Its excellent news that you are now able to handle both formats, so thanks for catching that.
Under no circumstance we want to break integrations, so I will make sure that if something changes we provide a considerate amount of time to change.
Again, we don’t use to make this kind of changes so I apologize for that
Thanks again!

Hi @tomasw I am seeing this issue today. I am seeing inconsistency in the format that created_date is being returned from the API. In some scenarios, the date format is “2020-09-21T13:51:46” and for some other orders the format is “2020-09-21T13:51:46+00:00”.

Is there any issue going on currently?

Hi @isaac.wyatt!
Thanks for reporting this. It does look like dates might be formatted a bit different now without the +00:00
Is there any chance you might point me to the library you are using to handle dates? That way I could investigate a bit about it and think of a way to handle it.
Thanks in advance and I apologize for the inconvenience!

I am using an ETL tool to handle the mapping. I am also seeing that the API responses yesterday varied depending on the order - some had the +00:00 while others did not. Can you let me know which format to expect moving forward?

Thanks @isaac.wyatt , it should be without the +00:00 from now on

1 Like

Hi @isaac.wyatt
I just wanted to provide a heads up, we had to revert that change and you might see dates with the +00:00 on your queries.
We are working on fixing this asap, but I will keep you updated.
I apologize once again for the inconvenience!

@tomasw do you know how long this will be an issue? How long can we expect to see one format vs the other… We will likely need to update our process to use either date format.

Thanks @isaac.wyatt!
I will keep you updated, currently we have an engineer working on something and as soon as we got it solved we will be moving back.
If you want you can share what language are you using and I can see if I could share a library that handles both cases.
Thanks again!