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

This commit is contained in:
antirez 2009-10-29 11:31:55 +01:00
parent f72b934d14
commit 6c9385e01d

View File

@ -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");