How Automated Time Tracking Works
Clocktopus automatically tracks your development time by listening to your git commits. When you push code to GitHub or Bitbucket, we calculate the time you spent working and create time entries automatically.
Supported Providers
GitHub
Webhook signature verification via SHA-256
Bitbucket
Webhook signature verification via HMAC
How It Works
Connect Repository
Link your GitHub or Bitbucket repository to a project in Clocktopus.
Configure Webhook
Set up the webhook in your repository settings to notify Clocktopus on push events.
Push & Track
Push commits as usual. Time entries are created automatically based on your commit history.
Time Calculation Rules
We calculate the time between your commits using your configured timezone and work hours. Here's how different scenarios are handled:
Same Day Commits
Exact time difference between commits is recorded
Multi-Day Commits
Days without commits are skipped. Only commit days count. Total: 3h
How Time is Calculated (Examples)
| Situation | Example | Time Recorded |
|---|---|---|
| When you have a previous commit | ||
| Same day | 10:00 AM → 2:00 PM | 4 hours (actual time) |
| Next weekday | Mon 3 PM → Tue 10 AM | 2h (Mon 3-5 PM) + 1h (Tue 9-10 AM) = 3h |
| Over a weekend | Fri 3 PM → Mon 10 AM | 2h (Fri) + 1h (Mon) = 3h (weekend skipped) |
| First commit of the day (no previous commit) | ||
| Weekday, during work hours | First commit at 10:00 AM | 1 hour (from 9 AM work start) |
| Weekday, before work hours | First commit at 7:00 AM | 0 hours (no reference) |
| Weekend | First commit on Saturday | 0 hours (no reference) |
Work Outside Regular Hours
When your first commit of the day happens before your configured work hours start (e.g., committing at 5 AM when your work day starts at 9 AM), the system has no reference point and will record 0 hours for that entry. However, subsequent commits on the same day will use that first commit as the reference point and track the actual time difference (e.g., 5 AM to 11 AM = 6 hours).
Weekends follow the same pattern since they are not considered working days. The first weekend commit records 0 hours (no reference point). Subsequent weekend commits track the actual time between them.
Commits Before Work Hours (Same Day)
First commit has no reference (0h). Second commit uses first as reference (actual time).
Weekend Commits (Same Day)
First weekend commit has no reference (0h). Subsequent commits track actual time.
Tip: We encourage reviewing your timesheet regularly, especially if you frequently work outside of your configured working hours. You can always adjust time entries manually to ensure accuracy.
The Single Timeline Principle
Your commits are tracked on a single timeline regardless of which project or repository they belong to. This means if you commit to Project A at 10:00 AM and Project B at 11:00 AM, the time entry for Project B will be 1 hour - the time since your last commit anywhere.
This design encourages focused work and regular commits. When you avoid multitasking and maintain the discipline of committing your work regularly, your work log stays accurate automatically.
Your Single Timeline Across Projects
Time entries are created for each project from the same continuous timeline
Best Practices
- 1.Commit regularly - Small, frequent commits provide more accurate time tracking than large, infrequent ones.
- 2.Focus on one task - Working on multiple projects simultaneously can make time entries less accurate.
- 3.Commit before switching - Before moving to a different project, commit your current work to capture accurate time.
- 4.Review automated entries - You can always adjust time entries manually if needed.
Configuration
Timezone
Set your timezone in Settings to ensure time calculations are based on your local time. This affects when your work day starts and ends.
Example: If you're in Sydney (UTC+10), a commit at 9 AM local time is correctly recognised as the start of your work day.
Work Hours
Configure your work day start and end times. Default is 9:00 AM to 5:00 PM.
Custom hours: You can set flexible hours like 7:00 AM - 3:00 PM or 10:30 AM - 6:30 PM to match your schedule.