From b88ba949f8d657034f808034321fabbd65bf8078 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 29 Mar 2012 18:04:12 +0200 Subject: added "date-unixtimestamp" property replacer option to format as a unix timestamp --- template.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'template.c') diff --git a/template.c b/template.c index bcdcc367..2326819c 100644 --- a/template.c +++ b/template.c @@ -521,6 +521,8 @@ static void doOptions(unsigned char **pp, struct templateEntry *pTpe) pTpe->data.field.eDateFormat = tplFmtRFC3164BuggyDate; } else if(!strcmp((char*)Buf, "date-rfc3339")) { pTpe->data.field.eDateFormat = tplFmtRFC3339Date; + } else if(!strcmp((char*)Buf, "date-unixtimestamp")) { + pTpe->data.field.eDateFormat = tplFmtUnixDate; } else if(!strcmp((char*)Buf, "date-subseconds")) { pTpe->data.field.eDateFormat = tplFmtSecFrac; } else if(!strcmp((char*)Buf, "lowercase")) { @@ -1258,6 +1260,9 @@ void tplPrintList(rsconf_t *conf) case tplFmtRFC3339Date: dbgprintf("[Format as RFC3339-Date] "); break; + case tplFmtUnixDate: + dbgprintf("[Format as Unix timestamp] "); + break; default: dbgprintf("[INVALID eDateFormat %d] ", pTpe->data.field.eDateFormat); } -- cgit