Part 9 of the fifth-protocol series. Every punch the terminal stores carries the terminal's own idea of the time. If its clock is ten minutes slow, everyone who arrives on time is on time and everyone who arrives eight minutes late is on time too. Time is the hardest field in a punch covers the general problem. This post is a narrower one: a terminal whose clock the connector cannot read or set.
Why not just set it
For the other brands, the connector can read the clock and, where the protocol allows, set it. For this terminal the public description of the protocol has no clock request. The vendor's software has one, so a command exists. I do not know its bytes.
The way to find out on site would be to try command bytes near the known ones and see what happens. That is exactly the thing the day's rules forbid. In this family of terminals, some commands clear the attendance log, and this terminal held about a year of an office's attendance. Nothing earns that risk. So setting the clock waits for the command from the vendor, or a capture of the vendor's own software doing it, and then a test against the simulator before the real terminal sees it.
Reading it does not have to wait.
The clock is already in the data
Two times arrive with every punch:
- The punch time, from the terminal's clock.
- The arrival time, stamped by the platform's server when the punch is saved, from a clock that is kept right.
For a punch read live, the gap between them is made of three things: how long the punch waited for the next read, how long the upload took, and how far the terminal's clock is off. The office PC reads once a minute, so the wait is anywhere from zero to sixty seconds and averages about thirty. Upload is a few seconds. What is left in the middle of many gaps is the clock error.
Estimated: 70 s behind. Inside five minutes, so nothing is shown. A minute rarely changes a late mark.
The first afternoon's numbers
Three punches arrived live in the first afternoon after the fix. Their gaps were:
| Punch time (terminal) | Arrived | Gap |
|---|---|---|
| 14:10:26 | 14:12:19 | 113 s |
| 14:16:50 | 14:19:00 | 130 s |
| 16:59:14 | 17:01:07 | 113 s |
With a read every minute, a correct clock gives gaps between about 10 and 75 seconds, centred near 40. A steady 113 says the terminal's clock is roughly a minute behind. Three punches are not enough to say how much exactly, which is why the warning uses many more.
The rule the platform uses
- The last 20 punches read live, and only those. Older punches brought in on request, or uploaded from a USB file, arrive hours or days after they happened. Twelve of them in a window of twenty move the middle by a day, as the figure shows when you switch them in.
- The median, not the average. One punch that waited for a PC coming back from sleep should not move the answer.
- Subtract half a read interval and the upload time. What is left is the estimate.
- Warn past five minutes. Under that, attendance rarely changes. Over it, a grace period of five or ten minutes starts deciding late marks, and HR should set the clock. The same rule replaced a fifteen-minute threshold on the brand that already had a clock warning.
The warning is on the machine's page in plain words: the terminal's clock is about N minutes slow, set it on the terminal's own menu. It sends nothing to the terminal.
What it cannot do
- It cannot separate a small error from the wait. A clock 20 seconds out either way moves the middle by 20 seconds, inside the spread a one-minute read interval makes anyway. That is fine: 20 seconds does not change attendance.
- It needs punches. A terminal nobody uses gives no estimate. The page says so instead of saying the clock is fine.
- It reads the clock, it does not fix it. Someone still has to set it on the terminal. For this office that can be done on the phone with whoever is there.
The last post is every command from the day, with what each one does.