time

TIME

TIME

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) "1487425986" 2) "830851" redis> TIME 1) "1487425986" 2) "833575"

© 2009–2017 Salvatore Sanfilippo
Licensed under the Creative Commons Attribution-ShareAlike License 4.0.
https://redis.io/commands/time

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部