3

I am relatively unfamiliar with Workfront, but I have, via an integration project, received a relatively straight forward query (from another developer) that is looking for tasks in Workfront that have a plannedStart and plannedEnd that fall within a given date range.

A fragment of the query looks like this:

/attask/api/v7.0/assgn/search?DE:assignedTo:Engineer+Code=XXX&task:plannedStartDate=2018-11-28T00:00:00:000

The query returns a payload, I deserialize it and process it.

I am discovering that, an identical query that is executed on my local machine (timezone: UTC+10) will return data, but a query run on my server (UTC+0) will not.
To be more specific, everything works perfectly when I run this locally on my laptop, but returns 0 results when run on a server that has a timezone of UTC+0.

Following an assumption that the issue is related to timezone, I updated the query to pass in an offset (and encoded the +):

/attask/api/v7.0/assgn/search?DE:assignedTo:Engineer+Code=XXX&task:plannedStartDate=2018-11-28T00:00:00:000%2B1100 

This seemed to have no effect. Finally, I updated the query to adjust the time based on the timezone of the machine that it is being executed from, effectively adjusting the passed in date by the offset. This also had no effect.

Am I on the right path here? Is there something else (perhaps request headers) that can help indicate the timezone? Unless I am missing something, these two identical queries run on two different machines each in a different timezone should be returning the same result.

I am calling into this via a HttpClient, and an API key is included as part of the query string.

Brendan Green
  • 11,676
  • 5
  • 44
  • 76
  • 2
    So first of all you want to take out the code out of picture and replicate the call using `curl` on your machine and then the `curl` on the server side. If curl works fine on both, then you need investigate code, if not then there is something to do with server itself – Tarun Lalwani Jul 29 '19 at 14:10
  • Make sure the end date is also correct. You will not get any data if the end data is before the start date and if the start to end date is so small that there is no data. – jdweng Aug 02 '19 at 14:12

0 Answers0