GraphQL Timezone Difference

Topic summary

Issue: When querying orders via the Admin GraphQL API with a timezone-specific filter (EST/GMT-5), the API correctly filters orders but returns timestamps in UTC format instead of the specified timezone. This differs from the REST API behavior, which returns timestamps in the requested timezone.

Query Example: The user filters orders using processed_at:2022-06-08T00:00:00-5:00 but receives results like "processedAt": "2022-06-09T03:08:47Z" (UTC) rather than EST.

Attempted Solution: Adding additional quotation marks around the datetime string (as suggested for created_at filters in Shopify’s search syntax guide) did not resolve the issue.

Current Workaround: The original poster plans to manually adjust the timezone after retrieving the data, as GraphQL appears to standardize output to UTC regardless of the input timezone.

Status: A follow-up inquiry asks whether a proper solution was found for returning results in Eastern time with daily granularity, suggesting the issue remains unresolved.

Summarized with AI on November 13. AI used: claude-sonnet-4-5-20250929.

Hi,

I’ve started using the Admin GraphQL instead of the Admin Rest API and I am having some trouble getting orders data. In my store, the order’s processedAt date is recorded in GMT-5. When querying with the Rest API I can just specify -5:00 (EST) and I can pull the date as it appears on the store. When I use the GraphQL API and specify -5:00 (EST), it pulls the correct orders but the timestamp is set to UTC. Is there a way to set it to EST like how the Rest API and store presents it or would I have to process that separately?

Thanks in advance!

'''
        {
            orders(first:8, reverse:true, query:"processed_at:2022-06-08T00:00:00-5:00"){
                pageInfo{
                    hasNextPage
                }
                edges {
                    node {
                        processedAt
                        createdAt
                    }
                }
            }
        }
        '''
{
  "data": {
    "orders": {
      "pageInfo": {
        "hasNextPage": true
      },
      "edges": [
        {
          "node": {
            "processedAt": "2022-06-09T03:08:47Z",
            "createdAt": "2022-06-09T03:08:48Z"
          }
        },
        {
          "node": {
            "processedAt": "2022-06-09T01:44:42Z",
            "createdAt": "2022-06-09T01:44:43Z"
          }
        },
        {
          "node": {
            "processedAt": "2022-06-09T00:52:09Z",
            "createdAt": "2022-06-09T00:52:10Z"
          }
        },
        {
          "node": {
            "processedAt": "2022-06-09T00:14:12Z",
            "createdAt": "2022-06-09T00:14:13Z"
          }
        },
        {
          "node": {
            "processedAt": "2022-06-09T00:13:53Z",
            "createdAt": "2022-06-09T00:13:55Z"
          }
        },
        {
          "node": {
            "processedAt": "2022-06-09T00:03:56Z",
            "createdAt": "2022-06-09T00:03:58Z"
          }
        },
        {
          "node": {
            "processedAt": "2022-06-08T23:17:11Z",
            "createdAt": "2022-06-08T23:17:14Z"
          }
        },
        {
          "node": {
            "processedAt": "2022-06-08T23:04:33Z",
            "createdAt": "2022-06-08T23:04:35Z"
          }
        }
      ]
    }
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 10,
      "actualQueryCost": 10,
      "throttleStatus": {
        "maximumAvailable": 2000.0,
        "currentlyAvailable": 1990,
        "restoreRate": 100.0
      }
    }
  }
}

Hi @edwinv

It looks like you need to add another set of quotation marks around the inner datetime string. You can see an example with the created_at filter in our search syntax guide, but I would recommend trying something like this:

{
  orders(first:8 reverse:true query:"processed_at:>'2022-06-08T00:00:00-5:00'") {
    nodes {
      id
    }
  }
}
1 Like

Hi James,

I added another set of quotation marks around the inner datetime string and the results were still in UTC, while my store displays EST (GMT-5).
For the time being I will adjust the time zone after pulling the data.
Thank you for your response!

1 Like

Hey @edwinv and @JamesG - Did you guys ever come to a solution? I have a shopifyQL query I am posting to the graphQL and wanted to get the table results back in eastern time at a daily granularity. Wanted to see if you guys solved for this already!