summaryrefslogtreecommitdiff
path: root/tools/pmrfc3164.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pmrfc3164.c')
-rw-r--r--tools/pmrfc3164.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/pmrfc3164.c b/tools/pmrfc3164.c
index 5dfa74f..2596470 100644
--- a/tools/pmrfc3164.c
+++ b/tools/pmrfc3164.c
@@ -84,7 +84,7 @@ CODESTARTparse
assert(pMsg->pszRawMsg != NULL);
lenMsg = pMsg->iLenRawMsg - pMsg->offAfterPRI; /* note: offAfterPRI is already the number of PRI chars (do not add one!) */
p2parse = pMsg->pszRawMsg + pMsg->offAfterPRI; /* point to start of text, after PRI */
- setProtocolVersion(pMsg, 0);
+ setProtocolVersion(pMsg, MSG_LEGACY_PROTOCOL);
/* Check to see if msg contains a timestamp. We start by assuming
* that the message timestamp is the time of reception (which we
@@ -95,6 +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) {
+ 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 */