Check that a visit’s start and end belong to the same visit
A dashboard shows a job took nearly two hours. The stored timestamps are valid and the displayed local times are correct. Yet no visit in the record lasted that long. The calculation has joined the start of one attempt to the end of another.
This fictional investigation separates event identity, elapsed time and local display. It is useful when office staff use field events to decide which reports are complete and ready for review.
Build the smallest record that exposes the mistake
Job J-84 has two visit attempts on 14 July 2026. Visit V-A starts but is stopped before the planned work can proceed. It has a stopped status and an explanatory note, but no completed-visit end event. Visit V-B later starts and completes.
The fictional records use explicit UTC instants:
| Event | Visit | UTC timestamp | Local display in America/Coyhaique |
|---|---|---|---|
| Start | V-A | 14 July 2026, 11:10 UTC | 08:10 |
| Start | V-B | 14 July 2026, 12:35 UTC | 09:35 |
| Completion | V-B | 14 July 2026, 13:05 UTC | 10:05 |
The business has defined the displayed interval as the time between a start and completion for the same completed visit. A stopped attempt is not included in that measure. This is a definition for the fictional operational view, not a rule for payroll, billing or staff evaluation.
The dashboard instead shows J-84 with an interval of 1 hour 55 minutes. That is the difference between V-A’s start and V-B’s completion.
Inspect the pairing before changing time-zone settings
A reviewer compares the source events with the calculation input. The report groups by job ID and selects the earliest start and latest completion. It does not retain the visit identity when assembling the interval.
The calculation is arithmetically correct for the two timestamps it selected. Its selection is wrong. Adding or subtracting an hour would conceal that mistake for one record without establishing a valid relationship between the events.
The review records the exact inputs: start event from V-A, completion event from V-B, grouping key J-84. The missing operation boundary is now visible. A job can contain multiple visits; a common job reference does not make all of their events interchangeable.
Repair the relationship and preserve the incomplete attempt
The fictional correction pairs start and completion by visit ID within the job. It also requires the approved completed state before displaying this particular interval.
V-B now has a 30-minute interval, from 12:35 to 13:05 UTC. V-A remains visible as stopped, with its note and no completed-visit duration. The repair does not invent an end time, set the interval to zero or erase the attempt to make the dashboard simpler.
The office can open both records. That matters because the stopped attempt may explain why another visit was arranged. The summary should support that understanding rather than compressing the history into one apparently complete event.
If the organization needs a different measure, such as total time including interrupted attempts, it must define the required boundaries and evidence separately. The repaired completed-visit measure should not be quietly reused under another label.
Verify local display without making it the cause
Named zones remain necessary for understandable local times. IANA’s 2025b release introduced America/Coyhaique for Aysén’s move to year-round UTC−03. Its time-zone database is updated as rules change.
For the dated example above, America/Coyhaique displays 08:10, 09:35 and 10:05. America/Santiago displays 07:10, 08:35 and 09:05 on the same date. These are supporting checks of the displayed instants, not competing definitions of the visit.
The 30-minute interval for V-B remains 30 minutes in either display. The repaired relationship depends on matching the correct events, not on choosing whichever zone makes a total look plausible.
A future appointment is a different kind of record: it may represent an intended local time under a named zone. Do not infer its scheduling policy from this historical-event calculation.
Add controls that can disprove the repair
A second job, J-85, has one complete visit from 14:00 to 14:45 UTC. Its 45-minute interval must remain unchanged. This catches a repair that simply forces every visit to the target case’s duration.
A third job, J-86, has a start and a draft report but no completion event. It remains incomplete and has no completed-visit interval. The report must not borrow an end from another job or use the current time as a silent substitute.
The fictional acceptance record is now:
| Record | Result after correction | Evidence retained |
|---|---|---|
| J-84 / V-A | Stopped; no completed interval | Original start and stopped note |
| J-84 / V-B | Completed; 30 minutes | Its own start and completion |
| J-85 / V-C | Completed; 45 minutes | Independent unchanged pair |
| J-86 / V-D | Incomplete; no completed interval | Start and pending report |
An ordinary office reviewer can explain each result by opening the related events. The source history is preserved.
Write down what the measure does not establish
A completed-visit interval does not necessarily measure productive labor, travel, an invoiceable duration or the time until the customer receives a report. Those may require different events and professional or business approval.
The handover records the grouping key, eligible state, missing-event behavior, time-zone display and control cases. If a later update changes the report, a maintainer can repeat the same exercise.
When a duration looks wrong, ask which operation each boundary belongs to before blaming the clock. The dashboard service and dispatched-versus-finished note explain how to keep that distinction useful in the wider office queue.
