fix bug #107442 - time stamp in log off. Use localtime vs gmtime

This commit is contained in:
Ron Pedde 2004-11-28 06:54:01 +00:00
parent fd70a618d6
commit cd59a2f1dd

View File

@ -121,7 +121,7 @@ void err_log(int level, unsigned int cat, char *fmt, ...)
switch(err_logdestination) { switch(err_logdestination) {
case LOGDEST_LOGFILE: case LOGDEST_LOGFILE:
tt_now=time(NULL); tt_now=time(NULL);
gmtime_r(&tt_now,&tm_now); localtime_r(&tt_now,&tm_now);
strftime(timebuf,sizeof(timebuf),"%F %T",&tm_now); strftime(timebuf,sizeof(timebuf),"%F %T",&tm_now);
fprintf(err_file,"%s: %s",timebuf,errbuf); fprintf(err_file,"%s: %s",timebuf,errbuf);
if(!level) fprintf(err_file,"%s: Aborting\n",timebuf); if(!level) fprintf(err_file,"%s: Aborting\n",timebuf);