From 3b3170d094510f8cdde36a9f24b9ca10b4ea24f4 Mon Sep 17 00:00:00 2001 From: jim-p Date: Wed, 4 Aug 2010 16:24:01 -0400 Subject: Don't split the date/time when forming a line's timestamp, use both. Otherwise it can lead to oddities when crossing a date border. Fixes #478 --- etc/inc/filter_log.inc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/etc/inc/filter_log.inc b/etc/inc/filter_log.inc index f5eb3af..ed4b311 100644 --- a/etc/inc/filter_log.inc +++ b/etc/inc/filter_log.inc @@ -264,11 +264,8 @@ function handle_ajax($nentries, $tail = 50) { /* We need this to always be in forward order for the AJAX update to work properly */ $filterlog = isset($config['syslog']['reverse']) ? array_reverse($filterlog) : $filterlog; foreach($filterlog as $log_row) { - $time_regex = ""; - preg_match("/.*([0-9][0-9]:[0-9][0-9]:[0-9][0-9])/", $log_row['time'], $time_regex); - $row_time = strtotime($time_regex[1]); + $row_time = strtotime($log_row['time']); $img = "{$log_row['act']}"; - //echo "{$time_regex[1]} - $row_time > $lastsawtime

"; if($row_time > $lastsawtime) { if ($log_row['proto'] == "TCP") $log_row['proto'] .= ":{$log_row['tcpflags']}"; -- cgit v1.1