mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Consistent date formatting from MySQL
This commit is contained in:
@@ -10,7 +10,7 @@ echo("<img src='images/16/report.png'> Recent Events</a>");
|
||||
echo(' </div>
|
||||
<table class="table table-hover table-condensed table-striped">');
|
||||
|
||||
$eventlog = dbFetchRows("SELECT *,DATE_FORMAT(datetime, '%d/%b/%y %T') as humandate FROM `eventlog` WHERE `host` = ? ORDER BY `datetime` DESC LIMIT 0,10", array($device['device_id']));
|
||||
$eventlog = dbFetchRows("SELECT *,DATE_FORMAT(datetime, '".$config['dateformat']['mysql']['compact']."') as humandate FROM `eventlog` WHERE `host` = ? ORDER BY `datetime` DESC LIMIT 0,10", array($device['device_id']));
|
||||
foreach ($eventlog as $entry)
|
||||
{
|
||||
include("includes/print-event-short.inc.php");
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
if ($config['enable_syslog'])
|
||||
{
|
||||
$syslog = dbFetchRows("SELECT *, DATE_FORMAT(timestamp, '%Y-%m-%d %T') AS date from syslog WHERE device_id = ? ORDER BY timestamp DESC LIMIT 20", array($device['device_id']));
|
||||
$syslog = dbFetchRows("SELECT *, DATE_FORMAT(timestamp, '".$config['dateformat']['mysql']['compact']."') AS date from syslog WHERE device_id = ? ORDER BY timestamp DESC LIMIT 20", array($device['device_id']));
|
||||
if (count($syslog))
|
||||
{
|
||||
echo('<div class="container-fluid">');
|
||||
|
Reference in New Issue
Block a user