TIME(3valkey)

πŸ“¦
version 9.0.6 Β· 2 versions
, in fedora 44

πŸ’– TIME(3valkey) β€” the Valkey Command Manual, bestie edition πŸ’–

okay so welcome to the Valkey Command Manual page for TIME(3valkey), and honestly? this one is a whole vibe. short, sweet, iconic. let's get into it πŸ•βœ¨


✨ NAME ✨

time β€” Returns the server time.

🌸 SYNOPSIS 🌸

TIME

that's it. that's the whole thing. no args, no drama, no flags. she's low maintenance and we love that for her πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

So TIME hands you back the current server time as a two-item list, bestie: first item is a Unix timestamp, second item is the amount of microseconds already elapsed in the current second. fr fr.

Basically the interface is super similar to the one of the gettimeofday system call. iykyk 😌

πŸ’œ REPLY πŸ’œ

valkey-protocol(7) Array reply β€” specifically, a two-element array consisting of:

  1. the Unix timestamp in seconds
  2. the microseconds' count

two little cuties in an array. periodt πŸŽ€

⭐ COMPLEXITY ⭐

O(1)

constant time, no cap. she does not scale with your data. she simply is πŸ”₯

πŸ‘‘ ACL CATEGORIES πŸ‘‘

@fast

yep, she's in the fast lane. main character energy only 🌈

πŸ•°οΈ HISTORY πŸ•°οΈ

  • Available since: 2.6.0

she's been around since 2.6.0 and she's still serving looks. an elder icon πŸ’–

πŸ“ EXAMPLES πŸ“

127.0.0.1:6379> TIME
1) "1714701491"
2) "723379"
127.0.0.1:6379> TIME
1) "1714701491"
2) "731773"

see how the seconds stayed the same but the microseconds went up? that's the whole point bestie, that's the ~microsecond granularity~ 🧚✨

πŸ’€ SEE ALSO πŸ’€

okay this is the long part and we are NOT skipping a single one, because every single one of these links is a real one and they all deserve their moment. here we go:


and that's the whole page bestie!! 🫢 this was Valkey version 9.0.0, dated 2025-10-21, from your friendly neighbourhood TIME(3valkey) manual. go ask the server what time it is, she'd literally love to tell you πŸ˜­πŸ’–βœ¨

πŸ“¦ where this page comes from