]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Fix the month extracted from a common log format
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Sat, 29 Sep 2012 16:05:02 +0000 (18:05 +0200)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Sat, 29 Sep 2012 16:05:02 +0000 (18:05 +0200)
The month number was one value short of the right value due to one
supernumerary subtraction

readlog_common.c

index 9dcaff0ef91f66e7230573ef95c07def87e2e027..39753da8f4ea529e71171f0247dde3d9fcb0f54e 100644 (file)
@@ -142,7 +142,7 @@ static enum ReadLogReturnCodeEnum Common_ReadEntry(char *Line,struct ReadLogStru
        if (*Line!=']') return(RLRC_Unknown);
 
        Entry->EntryTime.tm_year=Year-1900;
-       Entry->EntryTime.tm_mon=Month-1;
+       Entry->EntryTime.tm_mon=Month;
        Entry->EntryTime.tm_mday=Day;
        Entry->EntryTime.tm_hour=Hour;
        Entry->EntryTime.tm_min=Minute;