From 7f60277b8348264ebfe918a97e58d4f91e017c72 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 3 May 2012 15:42:28 +1200 Subject: [PATCH] Always default the timezone to something, even if the user did not. --- htdocs/always.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/always.php b/htdocs/always.php index a2bd5a39..5dec0ba1 100644 --- a/htdocs/always.php +++ b/htdocs/always.php @@ -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'; -- 2.11.4.GIT