From: cajus Date: Tue, 29 Dec 2009 13:17:06 +0000 (+0000) Subject: Convert time X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=88eb3e3b05a01f78fe04028a7c71fa7d643779da;p=gosa.git Convert time git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14984 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc b/gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc index 564bb2afe..87e4df6cd 100644 --- a/gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc +++ b/gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc @@ -226,6 +226,7 @@ class rsyslog extends plugin $res = mysql_query($query, $link); if($res){ while($attrs = @mysql_fetch_assoc($res)){ + $attrs['DeviceReportedTime']= $this->time2local($attrs['DeviceReportedTime']); $attrs['Facility']= $this->facility2string($attrs['Facility']); $attrs['Priority']= $this->severity2string($attrs['Priority']); $result['entries'][] = $attrs; @@ -351,6 +352,12 @@ class rsyslog extends plugin } + function time2local($str) + { + list($date, $time)= split(" ", $str); + list($y, $m, $d)= split("-", $date); + return "$d.$m.$y $time"; + } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: