Expected Records based on created at min and max are not as expected for orders endpoint

cammark
New Member
1 0 0

HI All,

If I call

/2021-04/orders/count.json?status=any&created_at_min=2021-05-01T00:00:00&created_at_max=2021-05-01T23:59:59

I receive a count of 701 records

My time zone in the shop is set to +00:00 GMT

If I call the order.json end point with the same date range I am receiving back in total 696 records 

14 are from the 2021-05-02 (from 00:00 - 01:00)

Any record from 00:00 - 01:00 for 2021-05-01 is not in the export. 

If I set my date range to 

created_at_min=2021-04-30T22:59:59&created_at_max=2021-05-01T22:59:59 

Then I receive only records for the 1 May, including what was missing in the 00:00 - 01:00 range before hand

It seems that the time zone is being applied in an odd way to orders.json requests.

Is there something I am missing or has anyone else had this issue?

Cheers

Mark

 

0 Likes
csam
Shopify Staff
Shopify Staff
34 5 4

Hi @cammark 

Requests via the API are always calculated by UTC, so you'll want to accommodate  for that in your request - GMT is the same as UTC, however because of the time of year, the timezone that is GMT is in summer time mode - BST - so it's an hour ahead from UTC.

CS | API Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes