toggl / toggl_api_docs

Documentation for the Toggl API
1.39k stars 235 forks source link

Incorrect Date validation prevents accessing data - api/v8/time_entries #316

Closed NETborg closed 6 years ago

NETborg commented 6 years ago

It seems that there is a problem with correct date time validation on server side resulting in getting code 400 response. It prevents to acquire set of Time Entries started within selected time range.

Here is an example request URL returning Invalid start date error, where I can't find any incorrectness according to your docs:

Client error: GET https://www.toggl.com/api/v8/time_entries?start_date=2018-08-01T00%3A00%3A00%2B0200&end_date=2018-08-12T23%3A59%3A59%2B0200 resulted in a 400 Bad Request response: Invalid start date

NETborg commented 6 years ago

OK. I've found source of the problem. There is an ISO 8601 incompatible datetime pattern defined as DateTime::ISO8601 constant (described here). DateTime::ATOM should be used instead.

Not an issue anymore.