mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added check for local timezone = php timezone (#4965)
This commit is contained in:
11
validate.php
11
validate.php
@ -170,9 +170,14 @@ if (strstr($strict_mode, 'STRICT_TRANS_TABLES')) {
|
||||
print_fail('You have MySQL STRICT_TRANS_TABLES enabled, please disable this until full support has been added: https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html');
|
||||
}
|
||||
|
||||
$tz = ini_get('date.timezone');
|
||||
if (empty($tz)) {
|
||||
print_fail('You have no timezone set for php: http://php.net/manual/en/datetime.configuration.php#ini.date.timezone');
|
||||
$ini_tz = ini_get('date.timezone');
|
||||
$sh_tz = rtrim(shell_exec('date +%Z'));
|
||||
$php_tz = date('T');
|
||||
|
||||
if (empty($ini_tz)) {
|
||||
print_fail('You have no timezone set for php: http://php.net/manual/en/datetime.configuration.php#ini.date.timezone.');
|
||||
} elseif ($sh_tz !== $php_tz) {
|
||||
print_fail("You have a different system timezone ($sh_tz) specified to the php configured timezone ($php_tz), please correct this.");
|
||||
}
|
||||
|
||||
// Test transports
|
||||
|
Reference in New Issue
Block a user