mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
use output of command date as datestring
this will imply the system time zone. command date and the given format are supported by the majority of linux distros
This commit is contained in:
+2
-2
@@ -4,10 +4,10 @@ $ERRORLOG = getenv('PHP_ERROR_LOG');
|
||||
if (empty($ERRORLOG)) {
|
||||
$ERRORLOG = '/var/log/lighttpd/error.log';
|
||||
}
|
||||
date_default_timezone_set('UTC');
|
||||
$date = exec("date +'%Y-%m-%d %H:%M:%S'");
|
||||
|
||||
function pi_log($message) {
|
||||
error_log(date('Y-m-d H:i:s') . ': ' . $message . "\n", 3, $GLOBALS['ERRORLOG']);
|
||||
error_log($date . ': ' . $message . "\n", 3, $GLOBALS['ERRORLOG']);
|
||||
}
|
||||
|
||||
function log_and_die($message) {
|
||||
|
||||
Reference in New Issue
Block a user