From d11e8221a8b9592bca7f219cc3d3cf3359273ba1 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 30 Aug 2013 18:29:46 +0200 Subject: milestone: defaultTZ can be set in msg obj (via imtcp) ... but parser does not yet use it. --- tools/pmrfc3164.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/pmrfc3164.c') diff --git a/tools/pmrfc3164.c b/tools/pmrfc3164.c index 5dfa74f0..23c8766c 100644 --- a/tools/pmrfc3164.c +++ b/tools/pmrfc3164.c @@ -95,6 +95,7 @@ CODESTARTparse if(datetime.ParseTIMESTAMP3339(&(pMsg->tTIMESTAMP), &p2parse, &lenMsg) == RS_RET_OK) { /* we are done - parse pointer is moved by ParseTIMESTAMP3339 */; } else if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), &p2parse, &lenMsg) == RS_RET_OK) { +dbgprintf("DDDD: timestamp parsed, dfltTZ '%s'\n", pMsg->dfltTZ); /* we are done - parse pointer is moved by ParseTIMESTAMP3164 */; } else if(*p2parse == ' ' && lenMsg > 1) { /* try to see if it is slighly malformed - HP procurve seems to do that sometimes */ ++p2parse; /* move over space */ -- cgit v1.2.3 From 177c77ca1e3045e77853014a37e712681e175e22 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Mon, 2 Sep 2013 11:55:51 +0200 Subject: apply default TZ if none is present in legacy timestamp --- tools/pmrfc3164.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/pmrfc3164.c') diff --git a/tools/pmrfc3164.c b/tools/pmrfc3164.c index 23c8766c..4f469a2d 100644 --- a/tools/pmrfc3164.c +++ b/tools/pmrfc3164.c @@ -95,7 +95,8 @@ CODESTARTparse if(datetime.ParseTIMESTAMP3339(&(pMsg->tTIMESTAMP), &p2parse, &lenMsg) == RS_RET_OK) { /* we are done - parse pointer is moved by ParseTIMESTAMP3339 */; } else if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), &p2parse, &lenMsg) == RS_RET_OK) { -dbgprintf("DDDD: timestamp parsed, dfltTZ '%s'\n", pMsg->dfltTZ); + if(pMsg->dfltTZ[0] != '\0') + applyDfltTZ(&pMsg->tTIMESTAMP, pMsg->dfltTZ); /* we are done - parse pointer is moved by ParseTIMESTAMP3164 */; } else if(*p2parse == ' ' && lenMsg > 1) { /* try to see if it is slighly malformed - HP procurve seems to do that sometimes */ ++p2parse; /* move over space */ -- cgit v1.2.3