Start on making date formats consistent

This commit is contained in:
Paul Gear 2014-08-07 03:45:30 +10:00
parent 738b79fce8
commit 0e3b24bebc
3 changed files with 7 additions and 2 deletions

View File

@ -111,7 +111,7 @@ if ($discovered_devices)
dbInsert(array('type' => 'discover', 'doing' => $doing, 'start' => $start, 'duration' => $proctime, 'devices' => $discovered_devices), 'perf_times');
}
$string = $argv[0] . " $doing " . date("F j, Y, G:i") . " - $discovered_devices devices discovered in $proctime secs";
$string = $argv[0] . " $doing " . date($config['dateformat']['compact']) . " - $discovered_devices devices discovered in $proctime secs";
if ($debug) echo("$string\n");
if($options['h'] != "new" && $config['version_check']) {

View File

@ -573,4 +573,9 @@ $config['update'] = 1;
$config['syslog_purge'] = 30; # Number in days of how long to keep syslog entries for.
$config['eventlog_purge'] = 30; # Number in days of how long to keep eventlog entries for.
# Date format for PHP date()s
$config['dateformat']['long'] = "r"; # RFC2822 style
$config['dateformat']['compact'] = "Y-m-d H:i:s";
$config['dateformat']['time'] = "H:i:s";
?>

View File

@ -118,7 +118,7 @@ if ($polled_devices)
dbInsert(array('type' => 'poll', 'doing' => $doing, 'start' => $poller_start, 'duration' => $poller_time, 'devices' => $polled_devices ), 'perf_times');
}
$string = $argv[0] . " $doing " . date("F j, Y, G:i") . " - $polled_devices devices polled in $poller_time secs";
$string = $argv[0] . " $doing " . date($config['dateformat']['compact']) . " - $polled_devices devices polled in $poller_time secs";
if ($debug) { echo("$string\n"); }
echo("\n" .