Skip to content
Timesheet Systems

All notes  /  03 · Data model

Storing Rounded Time

Rounding applied at capture destroys information permanently. Where in the pipeline it belongs, and how to test that the product does it there.

Procedure

Rounding is a presentation and billing decision. Products that apply it when the entry is saved have made it a data decision, and the original is gone.

Where rounding belongs

Capture: to the minute, or to the second. Never rounded.

Storage: as captured.

Calculation: rounding applied as a rule, with the rule version recorded.

Display and export: rounded per the applicable policy.

Each stage can be re-run if the policy changes. A system that rounds at capture cannot, and a policy change becomes a migration.

Why it matters beyond tidiness

Neutrality cannot be tested if the original is not stored. Testing whether rounding favours one side requires comparing raw against rounded, and that comparison is impossible once only the rounded value exists.

Different purposes need different rounding. Payroll and client billing frequently use different increments, and both need the same underlying record.

A policy change becomes retrospective. If the increment changes, everything since the change should use the new one and everything before should be reproducible under the old.

And in a dispute, the raw record is the evidence. A rounded value is an assertion about a calculation.

Testing a product

Enter a shift of 7 hours 52 minutes.

Export the raw record. Is 7:52 there, or 8:00?

Change the rounding increment and re-run the period. Does the total change, or is it frozen?

Look at an entry from before the change. Is it recalculated under the new rule, or preserved under the old? Either can be correct; silently doing one without saying so is not.

Ask where rounding is configured: per pay group, per client, or globally. Globally is a limitation you will hit.

The related question

Increment and rounding direction are different settings, and products conflate them.

Increment: the unit, such as six minutes or a quarter hour.

Direction: up, down or nearest.

Threshold: where nearest tips.

Ask for all three, and ask whether they can differ between payroll and billing. In many organisations they must.

What to write into requirements

Time stored to the minute, unrounded.

Rounding applied at calculation, configurable per purpose.

Raw values exportable.

A recalculation capability that can re-run a closed period after a rule correction, with the original preserved.

Without the last one, a misconfigured rule becomes a manual correction across everyone affected, which is the expensive version of the same problem.

Three settings, not one

Products conflate these and they are separate decisions.

Increment: the unit — six minutes, a quarter hour, a minute.

Direction: up, down, or nearest.

Threshold: where nearest tips.

Ask for all three, and ask whether they can differ between payroll and client billing. In many organisations they must, and a single global setting is a limitation you will hit in the first month.

Financial precision needs a shared rule

Where recorded minutes become client charges, rounding must be explicit and reproducible. Time tracking software for accountants should be tested with source, rounded and exported values side by side.