From 2b2eca1f5643260ae7ca6bec70c263ff0db5a8e3 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Tue, 14 Dec 2010 17:39:34 +0100 Subject: [PATCH] Zero-pad timestamps in MONITOR output Original report and fix: http://code.google.com/p/redis/issues/detail?id=404 --- src/replication.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/replication.c b/src/replication.c index a49aa2d8..9f8d9274 100644 --- a/src/replication.c +++ b/src/replication.c @@ -88,7 +88,7 @@ void replicationFeedMonitors(list *monitors, int dictid, robj **argv, int argc) struct timeval tv; gettimeofday(&tv,NULL); - cmdrepr = sdscatprintf(cmdrepr,"%ld.%ld ",(long)tv.tv_sec,(long)tv.tv_usec); + cmdrepr = sdscatprintf(cmdrepr,"%ld.%06ld ",(long)tv.tv_sec,(long)tv.tv_usec); if (dictid != 0) cmdrepr = sdscatprintf(cmdrepr,"(db %d) ", dictid); for (j = 0; j < argc; j++) { -- 2.45.2