TIME
Syntax
TIME
- Available since:
- Redis Open Source 2.6.0
- Time complexity:
- O(1)
- ACL categories:
-
@fast, - Compatibility:
- Redis Enterprise and Redis Cloud compatibility
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.
Examples
Redis Enterprise and Redis Cloud compatibility
| Redis Enterprise |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard |
✅ Standard |
Return information
Array reply: specifically, a two-element array consisting of the Unix timestamp in seconds and the microseconds' count.