Server time is the authoritative clock every player agrees on — use it for shared countdowns, expiry checks and skew measurement instead of trusting device clocks.
static ServerTimeResponse getServerTime(Client& client)
Retrieves current server time in multiple formats including UTC timestamp.
static ServerTimeWithOffsetResponse getServerTimeWithOffset(
Client& client,
int utcOffset
)
Retrieves server time with specified UTC offset adjustment.
Get returns the authoritative server clock — the one timestamp every player agrees on. Use it for shared countdowns, round-end deadlines, cooldown and expiry checks: anything a client clock can cheat or drift on. A UTC option keeps the value timezone-correct wherever the player is.
The offset variant exists for skew math: measure the difference once at session start, then offset local timestamps and you only pay the round trip once. The same call doubles as a lightweight latency probe — the CLI's bench command times it for exactly that reason.