Skip to content

change log of year timestamp #8

Open
sknaumov opened this Issue Nov 2, 2011 · 1 comment

2 participants

@sknaumov
sknaumov commented Nov 2, 2011

Hello.

Is it possible to change current timestamp representation from MM/DD/YY (which is a bit confusing) to YY/MM/DD or YYYY/MM/DD? The proposed ones can be lixicographically compared without permutations.

diff -uNr barnyard2-1.8.orig/src/util.c barnyard2-1.8/src/util.c
--- barnyard2-1.8.orig/src/util.c<->2010-03-03 14:02:11.000000000 +0300
+++ barnyard2-1.8/src/util.c<-->2011-11-02 10:38:44.160415128 +0400
@@ -213,8 +213,8 @@
if(BcOutputIncludeYear())
{
(void) SnortSnprintf(timebuf, TIMEBUF_SIZE,

  • "%02d/%02d/%02d-%02d:%02d:%02d.%06u ",
  • lt->tm_mon + 1, lt->tm_mday, lt->tm_year - 100,
  • "%04d/%02d/%02d-%02d:%02d:%02d.%06u ",
  • lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday, s / 3600, (s % 3600) / 60, s % 60, (u_int) tvp->tv_usec); }
@firnsy
Owner
firnsy commented Nov 14, 2011

@sknaumov, the current format is a legacy of the format from snort. We will be addressing a lot of the output formatting options in the next version and will definitely take this patch on board.

I'll leave this issue open as a reminder.

@firnsy firnsy was assigned Nov 23, 2011
@firnsy firnsy added the feature label Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.