A default timezone if there is not one set in the PHP configuration.

This commit is contained in:
Andrew McMillan 2012-05-03 19:12:22 +12:00
parent 155c70bba5
commit 4907d6992e

View File

@ -31,6 +31,12 @@ function early_exception_handler($e) {
}
set_exception_handler('early_exception_handler');
$c->default_timezone = ini_get('date.timezone');
if ( empty($c->default_timezone) ) {
$c->default_timezone = 'UTC';
date_default_timezone_set('UTC');
}
// Default some of the configurable values
$c->sysabbr = 'davical';
$c->admin_email = 'admin@davical.example.com';