Start Parameter for time-entries endpoint not UTC

I’m writing a script to pull time entries from Clockify and trying to use the start parameter for the time-entries endpoint.

From the API docs:

GET /workspaces/{workspaceId}/user/{userId}/time-entries
If provided, only time entries that started after the specified datetime will be returned. Datetime must be in ISO-8601 format (eg. “2019-04-16T05:15:32.998Z”). You both send and get time based on UTC.

I’m currently in Eastern Time so I’m in GMT-5 right now. My latest time entry is showing a date of 2021-02-23T18:53:00Z but if I pass the time-entries endpoint ?start=2021-02-23T18:00:00Z I get an empty results set.

However, if I pass the time-entries endpoint ?start=2021-02-23T13:00:00Z, I see that latest entry. I have to offset the “zulu” timestamp by my GMT offset to actually limit my result set to the correct start time as returned by the API.

Is this a known issue? Or am I not doing/understanding something correctly?


Hi Brett, Thank you for bringing this to our attention.

Currently, when using the GET /workspaces/{workspaceId}/user/{userId}/time-entries endpoint and the start parameter, you should pass the value to the paramater based on your time zone. However, you’ll get the time in all responses in the UTC time zone.

We will update our documentation to correctly reflect this and to make sure all users are aware that they should send the time based on their own time zone and that they will get the time based on UTC.

Hi Milan -

Thanks for that clarification of how the API works.

I’ll say that it’s a bit counter-intuitive to have to send in a GET parameter in a different timezone than any other interaction with the API. Especially since the format of the start time includes Z at the end which indicates that the timestamp is in UTC since Z is the zone designator for the zero UTC offset.

I can work around this, but it would be nice to be able to just work with one timezone when interacting with the API.