diff --git a/configure.in b/configure.in
index 4c612fd..2d775a3 100644
--- a/configure.in
+++ b/configure.in
@@ -463,6 +463,15 @@ AC_CHECK_HEADER(pcap.h,,[AC_ERROR(pcap.h not found ...)])
     CFLAGS="${CFLAGS} -DUNITTESTS"
     fi
 
+# enable iso8601 format for timestamps
+    AC_ARG_ENABLE(iso8601,
+            [  --enable-iso8601  Enable compilation of the unit tests],
+            [ enable_iso8601=yes
+            ])
+    if test "$enable_iso8601" = "yes"; then
+    CFLAGS="${CFLAGS} -DISO8601"
+    fi
+
 # enable debug output
     AC_ARG_ENABLE(debug,
             [  --enable-debug  Enable debug output],
diff --git a/src/util-debug.c b/src/util-debug.c
index 53b387d..c07f2c1 100644
--- a/src/util-debug.c
+++ b/src/util-debug.c
@@ -306,11 +306,19 @@ SCError SCLogMessage(SCLogLevel log_level, char **msg, const char *file,
                 gettimeofday(&tval, NULL);
                 tms = localtime(&tval.tv_sec);
 
+#ifdef ISO8601
+                cw = snprintf(temp, SC_LOG_MAX_LOG_MSG_LEN - (temp - *msg),
+                              "%s%04d/%02d/%02d %02d:%02d:%02d",
+                              substr, tms->tm_year + 1900, tms->tm_mon + 1, 
+                              tms->tm_mday, tms->tm_hour, tms->tm_min,
+                              tms->tm_sec);
+#else
                 cw = snprintf(temp, SC_LOG_MAX_LOG_MSG_LEN - (temp - *msg),
                               "%s%d/%d/%04d -- %02d:%02d:%02d",
                               substr, tms->tm_mday, tms->tm_mon + 1,
                               tms->tm_year + 1900, tms->tm_hour, tms->tm_min,
                               tms->tm_sec);
+#endif
                 if (cw < 0)
                     goto error;
                 temp += cw;
