Commit 6c9385e0 authored by antirez's avatar antirez
Browse files

Fixed issue 77 (Incorrect time in log files) thanks to youwantalex

parent f72b934d
...@@ -671,7 +671,7 @@ static void redisLog(int level, const char *fmt, ...) { ...@@ -671,7 +671,7 @@ static void redisLog(int level, const char *fmt, ...) {
time_t now; time_t now;
now = time(NULL); 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]); fprintf(fp,"%s %c ",buf,c[level]);
vfprintf(fp, fmt, ap); vfprintf(fp, fmt, ap);
fprintf(fp,"\n"); fprintf(fp,"\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment