Expand description
Heuristic detection of system-clock manipulation (backward/forward jumps).
Functions§
- clock_
manipulated - True if the (last_seen, now) pair indicates clock tampering (parity with Swift).
- clock_
rolled_ back - True if
nowis more than the backward tolerance behindlast_seen— i.e. the clock was rolled back since the last recorded contact. Unlikeclock_manipulated, this omits the forward-jump/offline-ceiling component, so it can gate the read-onlycrate::Keylight::stateresolver without governing offline duration (that stays withmax_offline_days). Operates on UTC epoch seconds, so timezone changes never trip it.