Timeclocks Overview

A timeclock represents a span of time when a worker was on the job.

Attributes:

  • id (int) - A unique identifier
  • role_id (int) - The ID of the role the user works in
  • user_id (int) - The ID of the user who recorded the timeclock
  • start (Iso8601 datetime) - Determines when the timeclock began, in UTC
  • stop (Iso8601 datetime) - Determines when the timeclock ended, in UTC

Notes:

  • A user can only have one timeclock record at a time.
  • If stop is null, then the worker is still clocked in.
  • The start and end times are stored in UTC in the Staffjoy database, and all queries to search the database need datetime values to be in UTC as well.
  • Timeclocks are allowed to be up to 23 hours long, workers will automatically be clocked out if they forget to clock out.
  • Timeclocks are specific to a role. If a worker is moved to a different role, new timeclocks would be created on a route with the new role_id.