MCPcopy
hub / github.com/redis/redis-py / redis_server_time

Function redis_server_time

tests/test_utils.py:70–73  ·  view source on GitHub ↗
(client)

Source from the content-addressed store, hash-verified

68
69
70def redis_server_time(client):
71 seconds, milliseconds = client.time()
72 timestamp = float(f"{seconds}.{milliseconds}")
73 return datetime.fromtimestamp(timestamp)
74
75
76# Tests for deprecated_function decorator

Calls 1

timeMethod · 0.45

Tested by

no test coverage detected