mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-22625 workaround for missing default timezone
This commit is contained in:
parent
8b2ebe7f03
commit
4ede587e28
@ -46,6 +46,12 @@ if (file_exists($configfile)) {
|
||||
define('CLI_SCRIPT', false); // prevents some warnings later
|
||||
define('AJAX_SCRIPT', false); // prevents some warnings later
|
||||
|
||||
// Servers should define a default timezone in php.ini, but if they don't then make sure something is defined.
|
||||
// This is a quick hack. Ideally we should ask the admin for a value. See MDL-22625 for more on this.
|
||||
if (function_exists('date_default_timezone_set') and function_exists('date_default_timezone_get')) {
|
||||
@date_default_timezone_set(@date_default_timezone_get());
|
||||
}
|
||||
|
||||
// make sure PHP errors are displayed - helps with diagnosing of problems
|
||||
@error_reporting(E_ALL);
|
||||
@ini_set('display_errors', '1');
|
||||
|
Loading…
x
Reference in New Issue
Block a user