OhMyBug

concurrency/state

Two Clocks In One Decision

#72rare4 sightingsfirst seen September 2026

What goes wrong

An expiry or countdown compares a timestamp issued by one clock (the server, another node) against the current time of a different clock (the browser, the serving machine) instead of using a duration measured on the issuing clock, so clock skew or a clock-sync jump expires it too early, extends it, or lets it back in.

Example

The server issues an expiry time; the browser compares it with its own clock, and a user whose laptop clock is five minutes fast sees 'session expired' right after logging in.

Not to be confused with

The two clocks disagree; not a time-limited ownership that runs out before the work it protects can stop (Lease Before Work Deadline), not a timezone mix-up and not an inclusive versus exclusive interval error.

Discovered by

Field notes · 1