Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

TIME

Last updated
TIME
Group
Server
Complexity
O(1)
Arity
1 (exactly, counting the command name)
Flags
read-only, fast, loading, stale
HotKV Cloud
All plans
On-Premise
no license needed

TIME returns the server’s wall-clock time. Use it when several clients need one clock to agree on, for example to timestamp events or check clock drift between application hosts.

An array of two bulk strings, in RESP2 and RESP3:

  1. The Unix time in seconds.
  2. The microseconds elapsed in the current second.
127.0.0.1:6379> TIME
1) "1790000000"
2) "482113"

Same as Redis 7 and Valkey 8.

LASTSAVE, INFO (server_time_usec)