# Date format changed unexpectedly

**URL:** <https://community.shiphero.com/t/date-format-changed-unexpectedly/952>\
**Category:** GraphQL API\
**Created:** [November 12, 2020, 9:32pm UTC](https://community.shiphero.com/t/date-format-changed-unexpectedly/952 "2020-11-12T21:32:52Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfmontanaro](https://avatars.discourse-cdn.com/v4/letter/j/f14d63/32.png) [@jfmontanaro](https://community.shiphero.com/u/jfmontanaro)\
**Post date:** [November 12, 2020, 9:32pm UTC](https://community.shiphero.com/t/date-format-changed-unexpectedly/952/1 "2020-11-12T21:32:52Z")

</div>

Hello,

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

`"2020-09-21T13:51:46+00:00"`

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

`"2020-09-21T13:51:46"`

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

Please advise whether this change is intentional or not.

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [November 13, 2020, 11:45am UTC](https://community.shiphero.com/t/date-format-changed-unexpectedly/952/2 "2020-11-13T11:45:09Z")

</div>

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!  
Tom

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [November 13, 2020, 1:39pm UTC](https://community.shiphero.com/t/date-format-changed-unexpectedly/952/3 "2020-11-13T13:39:19Z")

</div>

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!  
Tom

---

<div class="post-metadata">

**Author:** ![jfmontanaro](https://avatars.discourse-cdn.com/v4/letter/j/f14d63/32.png) [@jfmontanaro](https://community.shiphero.com/u/jfmontanaro)\
**Post date:** [November 13, 2020, 5:16pm UTC](https://community.shiphero.com/t/date-format-changed-unexpectedly/952/4 "2020-11-13T17:16:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [November 13, 2020, 7:08pm UTC](https://community.shiphero.com/t/date-format-changed-unexpectedly/952/5 "2020-11-13T19:08:07Z")

</div>

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!  
Tom

---

<div class="post-metadata">

**Author:** ![isaac.wyatt](https://avatars.discourse-cdn.com/v4/letter/i/6f9a4e/32.png) [@isaac.wyatt](https://community.shiphero.com/u/isaac.wyatt)\
**Post date:** [November 19, 2020, 1:15pm UTC](https://community.shiphero.com/t/date-format-changed-unexpectedly/952/6 "2020-11-19T13:15:43Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [November 19, 2020, 1:38pm UTC](https://community.shiphero.com/t/date-format-changed-unexpectedly/952/7 "2020-11-19T13:38:56Z")

</div>

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!  
Tom

---

<div class="post-metadata">

**Author:** ![isaac.wyatt](https://avatars.discourse-cdn.com/v4/letter/i/6f9a4e/32.png) [@isaac.wyatt](https://community.shiphero.com/u/isaac.wyatt)\
**Post date:** [November 19, 2020, 3:21pm UTC](https://community.shiphero.com/t/date-format-changed-unexpectedly/952/8 "2020-11-19T15:21:35Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [November 19, 2020, 4:25pm UTC](https://community.shiphero.com/t/date-format-changed-unexpectedly/952/9 "2020-11-19T16:25:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [November 19, 2020, 8:18pm UTC](https://community.shiphero.com/t/date-format-changed-unexpectedly/952/10 "2020-11-19T20:18:11Z")

</div>

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!  
Tom

---

<div class="post-metadata">

**Author:** ![isaac.wyatt](https://avatars.discourse-cdn.com/v4/letter/i/6f9a4e/32.png) [@isaac.wyatt](https://community.shiphero.com/u/isaac.wyatt)\
**Post date:** [November 19, 2020, 8:29pm UTC](https://community.shiphero.com/t/date-format-changed-unexpectedly/952/11 "2020-11-19T20:29:24Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![tomasw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.shiphero.com/tomasw/32/248_2.png) [@tomasw](https://community.shiphero.com/u/tomasw)\
**Post date:** [November 19, 2020, 8:40pm UTC](https://community.shiphero.com/t/date-format-changed-unexpectedly/952/12 "2020-11-19T20:40:45Z")

</div>

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!  
Tom
