summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a8d54a3)
raw | patch | inline | side by side (parent: a8d54a3)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 29 Dec 2009 13:17:06 +0000 (13:17 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 29 Dec 2009 13:17:06 +0000 (13:17 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14984 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc | patch | blob | history |
diff --git a/gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc b/gosa-plugins/rsyslog/addons/rsyslog/class_rsyslog.inc
index 564bb2afe81bd1cf5ddf86be8f1f7ef89acfd1c6..87e4df6cd6f826b8c651029d4e9d42c61b45c229 100644 (file)
$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;
}
+ 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: