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

1

Connect Repository

Link your GitHub or Bitbucket repository to a project in Clocktopus.

2

Configure Webhook

Set up the webhook in your repository settings to notify Clocktopus on push events.

3

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

10:00 AM
Commit 1
1.5h
11:30 AM
Commit 2
2.5h
2:00 PM
Commit 3

Exact time difference between commits is recorded

Multi-Day Commits

Configured work hours between 9 AM and 5 PM
Mon 3 PM
Commit 1
2h
Tue/Wed
No commits
1h
Thu 10 AM
Commit 2

Days without commits are skipped. Only commit days count. Total: 3h

How Time is Calculated (Examples)

SituationExampleTime Recorded
When you have a previous commit
Same day10:00 AM → 2:00 PM4 hours (actual time)
Next weekdayMon 3 PM → Tue 10 AM2h (Mon 3-5 PM) + 1h (Tue 9-10 AM) = 3h
Over a weekendFri 3 PM → Mon 10 AM2h (Fri) + 1h (Mon) = 3h (weekend skipped)
First commit of the day (no previous commit)
Weekday, during work hoursFirst commit at 10:00 AM1 hour (from 9 AM work start)
Weekday, before work hoursFirst commit at 7:00 AM0 hours (no reference)
WeekendFirst commit on Saturday0 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)

5:00 AM
Commit 1
0h recorded
6h actual
11:00 AM
Commit 2
6h recorded

First commit has no reference (0h). Second commit uses first as reference (actual time).

Weekend Commits (Same Day)

Saturday
2:00 PM
Commit 1
0h recorded
2h actual
Saturday
4:00 PM
Commit 2
2h recorded

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

Project A
9:00 AM
1.5h
Project B
10:30 AM
1.5h
Project A
12:00 PM
3h
Project C
3:00 PM

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.

How Automated Time Tracking Works | Clocktopus