TIME
Available since 2.6.0.
Time complexity: O(1)
The TIME command returns the current server time as a two items lists: a Unix timestamp and the amount of microseconds already elapsed in the current second. Basically the interface is very similar to the one of the gettimeofday
system call.
*Return value
Array reply, specifically:
A multi bulk reply containing two elements:
- unix time in seconds.
- microseconds.
*Examples
redis> TIME
- 1) "1576238462"
- 2) "816327"
redis> TIME
- 1) "1576238462"
- 2) "817055"