elogtool: Fix off-by-one error in month in timestamp

elogtool was setting the timestamp with the wrong value in the month.
This CL fixes that by incrementing the month by one. This is needed
since gmtime() returns the month value starting at 0.

TEST=pytest elogtool_test.py (see next CL in relation chain)

Change-Id: I00f89ed99b049caafba2e47feae3c068245f9021
Signed-off-by: Ricardo Quesada <ricardoq@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57868
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
diff --git a/util/cbfstool/eventlog.c b/util/cbfstool/eventlog.c
index 8b03686..3ea352e 100644
--- a/util/cbfstool/eventlog.c
+++ b/util/cbfstool/eventlog.c
@@ -657,8 +657,9 @@
 
 	event->type = type;
 	gmtime_r(&secs, &tm);
+	/* Month should be +1, since gmtime uses 0 as first month */
 	elog_fill_timestamp(event, tm.tm_sec, tm.tm_min, tm.tm_hour,
-			    tm.tm_mday, tm.tm_mon, tm.tm_year);
+			    tm.tm_mday, tm.tm_mon + 1, tm.tm_year);
 
 	if (data && data_size) {
 		uint32_t *ptr = (uint32_t *)&event[1];