From 9cd0f4b4fa85037ad30f87bad08e49c4aa462594 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Sun, 9 Oct 2016 03:06:09 +0200 Subject: [PATCH] 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 --- php/auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/php/auth.php b/php/auth.php index 56d735e6..90b9061c 100644 --- a/php/auth.php +++ b/php/auth.php @@ -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) {