Timezone doesn't seem correct

Hi,
We’ve set the timezone in account settings to Los Angeles, but the picks/packs etc timestamps in API query results don’t seem to reflect our working hours. Is there anything we can do to fix that?
Thank you!

Hey @Raj,

Happy Friday and thanks for reaching out!
Let me investigate further and I’ll get back to you with an update.

Best,
RayanP

Hey @Raj,

This is a known issue making its way to our Engineering Team. I’ll give it a bump to try and push it along.

Please let me know if you have any questions or concerns, thanks!

Best,

Thank you @sh-agent, I appreciate the updates. I hope it’s resolved soon.

Also @sh-agent, in the meantime would you be able to tell me what timezone are the query results shown in?
Thank you!

Hey @Raj,

The query results are intended to display in UTC. However, this issue is causing the results to be offset by a random amount of time. We’re unable to discern what the cause of this issue is at the time and hoping that our Engineering Team could shed some light on that.

Please let me know if this was unclear or if you have any more questions!

Best,
RayanP

Hey @sh-agent,
Ohh that’s worse than I thought… but still good to know that’s what the problem is. I hope your engineers are able to figure this one out quick, as this is throwing off all our performance reports right now.
Thank you

1 Like

Hey @sh-agent, any update here pls?
Hi @tomasfd, maybe you could have a look into this too?

Thank you guys!

Hey @Raj!

Engineers have been working on the issue this past week, they have a fix coming up soon.

Best,
TomasFD

Thank you @tomasfd! That’s great to know - really looking forward to it :smiley:

Hey @Raj,

A fix has been rolled out for this issue.
Please let me know if you run into any problems on your end!

Best,
RayanP

Wow that’s great news! Thank you @sh-agent
QQ - Does the fix mean that the timestamp would now follow the timezone set in account settings? Or would that be UTC?

Hey @Raj,

I believe that should be in UTC as well.

Best,
RayanP

Hi @sh-agent ,
I have been trying it out and the good news is that reported timestamps do seem to accurately reflect UTC time.

But can you pls confirm what timezone are the timestamps in my queries interpreted in?
Say if I use a date_from value of “2022-07-11 13:58:34”, then is that interpreted to be in:
a) My computer’s timezone
b) Timezone set in SH account settings
c) UTC

Pls note all of the above are different for me right now. And I’m trying to query the number of shipments made on a date and the number doesn’t match what’s shown in dashboard - so I’m trying to resolve any timezone related issues.

Thank you!

1 Like

Hello @Raj!

That would be option B from your list.

If you are running into discrepancies, please let me know.

Best!
TomasFD

Thank you @tomasfd, though going through some results it seems that when I convert local time to UTC and use those as timeframes in my query, then the results match what I see in the online dashboard - which would mean that the option C would be correct

I think all dates are stored in UTC and UTC dates should be used for query and mutation. At least that’s what I thought until now.

I have issues with mutation to change the required_ship_date, when I am pushing a new UTC date it will still be displayed UTC in the Shiphero UI:

Basically, the date I push is the date I see as if there was no timezone conversion (or if the date was not timezone aware). Changing the timezone in the settings doesn’t do anything.

Are all dates stored in UTC except the required_ship_date?

Seems like that’s the case, which is very confusing because if I take ‘2023-04-10 00:00:00’ and I assume that it’s UTC (like every other date), it becomes ‘2023-04-09’ …

1 Like

For the community here’s what the conclusion was after talking with support:

I can confirm that for the required_ship_date, we take it as sent, process the UTC delta if sent, and remove the time component at the display.

If you send `:2023-06-19` we save `"2023-06-19 00:00:00"` and we show **2023-06-19**

If you send `:2023-06-19 02:00:00` we save `"2023-06-19 02:00:00"` and we show **2023-06-19**

If you send `:2023-06-19 02:00:00 -04:00"` we save `"2023-06-19 06:00:00"` and we show **2023-06-19**

If you send `:2023-06-19 02:00:00 +04:00"` we save `"2023-06-18 22:00:00"` and we show **2023-06-18**
2 Likes

Thank you! That’s very helpful info - I’ve struggled with ShipHero’s timestamps a lot and this does reduce some of the mystery involved with it.

2 Likes