Choose the exact deadline boundary for a Sui claim
A client countdown can reach zero before the transaction observes an eligible chain timestamp. Put the release condition in Move and test the boundary with the same unit used by the clock.
Borrow the chain’s shared Clock
The shared system Clock lives at 0x6 and exposes milliseconds. Pass it as an immutable reference in a user transaction. The function below opens a claim at the exact deadline, including equality.
public fun can_claim(clock: &sui::clock::Clock, deadline_ms: u64): bool {
clock.timestamp_ms() >= deadline_ms
}
Test a timestamp just before, at and after release
For a deadline of 5000, the expected results at 4999, 5000 and 5001 are false, true and true. If a frontend stores Unix seconds, convert them to milliseconds exactly once. Compare the on-chain timestamp used by execution with the stored deadline when diagnosing an early rejection. Local device time cannot establish the observed chain time.