How to resolve the “Start time is greater than end time” error when starting timer via API
1 min read
If you encounter the error Start time is greater than the end time
when trying to start the timer via API, follow these steps:
Problem #
- This issue occurs when the start time is sent according to a different time zone, and the API expects times in UTC
- For example, sending a start time from the Brussels time zone (+1) will cause the error
Solution #
- Check time zone:
- The Clockify API uses UTC time zone for start times. Make sure you are sending the start time in UTC
- The Clockify API uses UTC time zone for start times. Make sure you are sending the start time in UTC
- Check the following details, as well:
- API call, including the endpoint, request body, headers, and parameters
- Status code and error message you receive
- Local time zone and how the start time is specified in the request
- Additional note:
- In some cases, the call might go through even if the start time is sent in the user’s local time zone, but the timer will start with a negative duration value
Once the start time is corrected to UTC, the issue will be resolved and the timer should start as expected.
Was this article helpful?
Thank you! If you’d like a member of our support team to respond to you, please drop us a note at support@clockify.me