toggl / toggl_api_docs

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

/time_entries doesn't handle ISO dates without seconds? #373

Closed geoffreywiseman closed 2 years ago

geoffreywiseman commented 4 years ago

If I issue a request for time entries where the start/end dates have hh:mm but not :ss, the API seems to fail to parse those date/times:

e.g.

curl -v -u <apitoken>:api_token "https://www.toggl.com/api/v8/time_entries?start_date=2020-04-01T00%3A00-04%3A00&end_date=2020-04-30T00%3A00-04%3A00"

results in:

< HTTP/2 400
< server: nginx
< date: Sat, 02 May 2020 23:59:26 GMT
< content-type: text/plain; charset=utf-8
< content-length: 19
< cache-control: no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0
< x-content-type-options: nosniff
< x-content-type-options: nosniff
< x-toggl-request-id: 10f53989f49c5cf9c6a96d4fb52548a8
< instance: time-web3
< strict-transport-security: max-age=15552000; includeSubDomains
< x-we-are-hiring: https://toggl.com/jobs/
< x-request-id: 10f53989f49c5cf9c6a96d4fb52548a8
< via: 1.1 google
< alt-svc: clear
<
Invalid start date
* Connection #0 to host www.toggl.com left intact
* Closing connection 0

Adding seconds to the time seems to solve the problem.

joeriharleman commented 2 years ago

Hello @geoffreywiseman!

Thank you for submitting your issue. Unfortunately this repository is largely unmaintained, which means issues remain unseen and do not get dealt with in a respectable manner. We're sorry for not getting back to you sooner.

This issue has been around for a long time so we will close it for now, but please let our excellent 24/5 support staff know you if you have any unresolved issues with our platform, documentation or APIs. They're also really good at noting down feature requests for our development teams. Please find them on our support page by clicking the little icon in the bottom right corner of the screen.

Kind regards, Joeri from Toggl