A device clock can be wrong while the user's edit is valid. Do not let wall-clock timestamps alone decide which offline operation overwrites another or which message logically came first.
Separate display time from causality and conflict authority. The timestamp useful to a person reading history may not be sufficient for the server to resolve competing changes safely.
Define what order means for each workflow
Creation order, server acceptance order, user-entered event time, and dependency order are different concepts. A backdated inspection date should not make a newly submitted correction disappear behind an older operation.
Preserve stable operation identity, base revision, and explicit predecessors where the business action depends on earlier work. Use a reviewed server or protocol ordering rule for accepted data, with a deterministic tie-break where the model requires one.
Test a fictional two-device history
Suppose a phone's clock is twenty minutes ahead and a tablet's is ten minutes behind. Both edit the same request offline. Reconnect them in both orders and verify the result follows the conflict policy rather than the apparently newest device time.
Add identical timestamps, a manual clock change, a time-zone change, and a daylight-saving display transition where relevant to the audience. Confirm the interface can explain event time without using local formatting as the identity of an operation.
For a create-then-update sequence, verify the update remains dependent on creation even if its wall-clock value appears earlier. For independent messages, define the acceptable eventual display order and how reordering is communicated.
Keep measurement and audit semantics clear
Store receipt time and any supplied event time with labels that preserve their meaning. Do not silently replace one with the other and later describe the history as exact evidence of user chronology.
For local elapsed durations, use a suitable elapsed-time mechanism rather than subtracting wall-clock values that can jump. For cross-system timing, state uncertainty and avoid comparing unrelated clocks as though they were synchronised perfectly.
The tradeoff is simple sorting versus reliable meaning. Timestamp sorting is easy and may be adequate for low-consequence display, but it should not become an accidental conflict-resolution rule for approvals, appointments, or ownership changes.
Flutter's offline-first guide provides architectural context. The Social App case study documents related offline messaging work. This clock-skew matrix is fictional and contains no measurement claim.
Questions about offline clock differences
Should the newest device timestamp always win?
No. Clocks can be inaccurate and timestamps do not necessarily establish causal order or business authority.
Can the server discard user-entered event time?
It may need that value for the task. Keep it separate from acceptance time and validate its role under the product's rules.
What should a review test first?
Skew two device clocks, make conflicting edits, and reverse reconnect order. Bring inconsistent outcomes to a mobile ordering review.