]> git.saurik.com Git - redis.git/commitdiff
Fixed issue 77 (Incorrect time in log files) thanks to youwantalex
authorantirez <antirez@gmail.com>
Thu, 29 Oct 2009 10:31:55 +0000 (11:31 +0100)
committerantirez <antirez@gmail.com>
Thu, 29 Oct 2009 10:31:55 +0000 (11:31 +0100)
redis.c

diff --git a/redis.c b/redis.c
index 16f2e2e7203ec412fcbb3030c7f3f8ef48674402..e4f1a76332d02f719bcaf2907e46b67df3f1a4e2 100644 (file)
--- a/redis.c
+++ b/redis.c
@@ -671,7 +671,7 @@ static void redisLog(int level, const char *fmt, ...) {
         time_t now;
 
         now = time(NULL);
-        strftime(buf,64,"%d %b %H:%M:%S",gmtime(&now));
+        strftime(buf,64,"%d %b %H:%M:%S",localtime(&now));
         fprintf(fp,"%s %c ",buf,c[level]);
         vfprintf(fp, fmt, ap);
         fprintf(fp,"\n");