It's all about the answers!

Ask a question

ReportsREST API date filter TimeZone error

Matthias Lückl (2325) | asked Apr 09 '13, 5:50 a.m.
edited Apr 09 '13, 5:54 a.m.
While trying to obtain information about allocations via REST calls, I stumbled across a problem with the date handling (e.g. the modified date) of the REST service.

Link to the documentation ("Examples" section):

According to the 4th example in the documentation, I can filter a work item by date, using a compare function:
workitem/workItem[modified > 2010-12-07T10:10:53.000-0500]/(id|summary)

This works completely fine. However, since I live in the GMT+1 time zone, i need to add a +0100 instead of a -0500 to the date string, which results in an error:
Error 500: CRRED0125E: Invalid value: 0100. Expected "and" or "or"

The problem is the +, which the REST call interprets wrong in this case. Is there a workaround for this issue, or is it a bug?


One answer

permanent link
Matthias Lückl (2325) | answered Apr 09 '13, 6:15 a.m.
I have found a workaround for the problem. I simply need to encode the "+" string as "%2B" (url encoding for "+"), then it works fine.

Your answer

Register or to post your answer.