Punch Times Look Wrong: Time Zones and the Device Clock
If punch times look wrong, the cause is one of two things: the clock on the device, or the time zone in the data.
1. The device clock is wrong
- Compare the time on the device with the real time.
- If the time goes back to a wrong value after every restart, the clock battery is worn out. See Fix biometric device time resetting after restart.
- Otherwise set the date and time again from the device menu.
2. The time zone in the data
Cams data carries times in this format: YYYY-MM-DD HH:mm:ss GMT +OFFSET, for example 2020-09-17 07:48:22 GMT +0530.
- The Time field is in UTC, the time the event was processed.
- Times set by the device, such as LogTime (the punch itself) and OperationTime, are device-local and can carry a different offset.
So the same moment can look different depending on which field you read. Both are right. They use different zones.
For developers
- Read the offset in every time value. Do not drop it.
- Convert to UTC before you store or compare times, then convert to the local zone for display.
- When one user punches on several devices, sort all punches by their punch time (LogTime) before you decide in and out.
When the date on a device is changed by hand, Cams reports that change to your server (the ManuallyDateModified callback).
Still stuck? Email support@camsbiometrics.com with the device serial number and a short description of the problem.
Was this article helpful?