TIME
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.
Return value
Section titled “Return value”An array of two bulk strings, in RESP2 and RESP3:
- The Unix time in seconds.
- The microseconds elapsed in the current second.
Examples
Section titled “Examples”127.0.0.1:6379> TIME1) "1790000000"2) "482113"Compatibility
Section titled “Compatibility”Same as Redis 7 and Valkey 8.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.