
Imagine a shop terminal that can accept offline payments until 6 p.m. At 5:50, its clock jumps to 6:50. Should the shop stop taking payments? If that same clock later jumps backwards, should the terminal be allowed to accept them again?
The answer depends on what the system is actually measuring. A phone can tell you the time of day or count how long something has lasted. For a payment system, choosing the wrong one can cut off someone who is still within their allowance, or keep offline acceptance open longer than intended.
“Until 6 p.m.” and “for 30 minutes” are different rules
Start by writing the rule as a sentence. “Accept payments until 6 p.m. Abuja time” is a deadline tied to a particular moment. “Give this checkout attempt 30 seconds to finish” is an interval measured from the start of that attempt. The first needs a reliable way to tell what time it is. The second needs a timer that measures how much time has passed.
Android’s timekeeping documentation explains that the device wall clock can move backwards or forwards when it is adjusted, while its elapsed-realtime clock counts from system boot and includes deep sleep. Apple’s Swift documentation similarly describes a continuous clock that keeps advancing while the system is asleep. A timer of that kind can keep counting during sleep even if the app isn’t running at the moment the interval ends.
Here’s a small test that makes the difference visible. Start a 30-second checkout timer and adjust the device time while the checkout is open. A change to the display clock should not turn 30 seconds into an hour or end the checkout immediately. For that interval, elapsed time is what matters.
A reboot breaks the simple calculation
Now make the rule “offline acceptance is available for four hours after the last successful check.” While the terminal stays on the same boot, a duration measured from that check can be useful. If the device restarts, however, a since-boot timer starts counting from the new boot. A reading from before the restart cannot be compared directly with one from after it.
Restarting must not silently grant four more hours. The product has to define what counts as reliable evidence that the original interval remains valid across the restart. If the supported hardware and payment scheme cannot establish that, one defensible policy is to require an online check before accepting new offline payments. Customers should know this boundary before they depend on the feature.
A calendar deadline needs its own treatment. Suppose the provider issued an authorisation that ends at 6 p.m. Verifying who issued it does not tell a disconnected device whether it is now past 6. If the device cannot establish trustworthy current time, the product needs a defined response. The ordinary time shown on the lock screen should not become the deciding evidence merely because no better information is available.
Tell people what actually happened
Consider two messages: “Your wallet expired” and “We can’t verify your offline allowance. Connect to the internet to check it.” The second is more accurate when the app cannot establish the time or the allowance after a restart. Save “expired” for cases where the system can establish that the deadline passed.
Keep that message separate from the status of sales already recorded. A terminal can refuse to start a new offline payment and still have earlier transactions to report. A cashier should be able to tell the difference without guessing whether to take a second payment.
Also separate the time zone used for display from the deadline itself. If an offer ends at a fixed instant, changing the time zone should change the displayed local time of that deadline, not how long the offer remains available. If the business requires a branch-local cutoff, document which branch time zone defines it.
Put the clock into the test plan
- Change the device time in both directions. Check that a checkout interval keeps counting correctly and that a verified expiry cannot be undone by a display change.
- Put the device to sleep and restart it offline. Check what the two events do to an active timer and to permission for new sales.
- Test the boundary itself. Define what happens if a payment starts shortly before the deadline but crosses it while in progress. Draw that line once and make both the interface and the payment rules follow it.
When you review an offline time limit, ask one more question: what evidence will the device use to enforce it when the network is unavailable? Until that is answered, the limit is a number on a screen.