Fix compiler warning in log-httplog.c & change stats.log to log as mm/dd/yyyy as well.

remotes/origin/master-1.1.x
Victor Julien 15 years ago
parent 791d177c7f
commit 3fcfaef9f7

@ -1004,7 +1004,7 @@ static int SCPerfOutputCounterFileIface()
"---------------------\n");
fprintf(sc_perf_op_ctx->fp, "Date: %" PRId32 "/%" PRId32 "/%04d -- "
"%02d:%02d:%02d (uptime: %"PRId32"d, %02dh %02dm %02ds)\n",
tms->tm_mday, tms->tm_mon + 1, tms->tm_year + 1900, tms->tm_hour,
tms->tm_mon + 1, tms->tm_mday, tms->tm_year + 1900, tms->tm_hour,
tms->tm_min, tms->tm_sec, days, hours, min, sec);
fprintf(sc_perf_op_ctx->fp, "----------------------------------------------"
"---------------------\n");

@ -99,7 +99,6 @@ static void CreateTimeString (const struct timeval *ts, char *str, size_t size)
time_t time = ts->tv_sec;
struct tm local_tm;
struct tm *t = (struct tm *)localtime_r(&time, &local_tm);
uint32_t sec = ts->tv_sec % 86400;
snprintf(str, size, "%02d/%02d/%02d-%02d:%02d:%02d.%06u",
t->tm_mon + 1, t->tm_mday, t->tm_year + 1900, t->tm_hour,

Loading…
Cancel
Save