Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hello Team,
I'm trying to get a list of orders using the rest API with a specific date and time, but the API response isn't returning accurate results.
Solved! Go to the solution
This is an accepted solution.
Hi babyorgano,
Thanks for your post. The created_at time in the screenshot is 2022-12-18T04:36:54+05:30, which has a timezone modifier within it of +05:30 hours.
When no timezone modifier is specified in the created_at_max and created_at_min fields of the Orders API query the system defaults to the UTC timezone which has a timezone modifier of 0 hours.
So, when the timezone modifier of +5:30 hours is subtracted from the created_at time of 2022-12-18T04:36:54+05:30 it is 2022-12-17T23:06:54+00:00 which is within the time specified in the query in UTC time.
Hope you have a great day
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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
This is an accepted solution.
Hi babyorgano,
Thanks for your post. The created_at time in the screenshot is 2022-12-18T04:36:54+05:30, which has a timezone modifier within it of +05:30 hours.
When no timezone modifier is specified in the created_at_max and created_at_min fields of the Orders API query the system defaults to the UTC timezone which has a timezone modifier of 0 hours.
So, when the timezone modifier of +5:30 hours is subtracted from the created_at time of 2022-12-18T04:36:54+05:30 it is 2022-12-17T23:06:54+00:00 which is within the time specified in the query in UTC time.
Hope you have a great day
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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