CXone OData Query for Agent State History Last 24 Hours

Looking for advice on constructing the correct OData filter for CXone Reporting API (v2) to fetch agent state history. I need to query GET /api/v2/reporting/agents/states for the last 24 hours, but my current $filter syntax using substringof fails with a 400 Bad Request.

My attempt looks like startTime ge 2023-10-27T12:00:00Z, yet the API demands ISO 8601 strings in a specific format that Zapier’s code step often mangles. How do you handle dynamic UTC offset calculations in the request body?

Here is the failing JSON payload structure I am sending via a custom trigger action. Any working examples for the timeRange object would help.