From 2abf80e333ba7fee1e220a47d375d8e681d8fed6 Mon Sep 17 00:00:00 2001 From: Klaus Silveira Date: Tue, 30 Oct 2012 23:57:47 -0200 Subject: [PATCH] Setting the default date timezone to make sure systems without a properly configured php.ini can run GitList --- index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.php b/index.php index 234ab84..bed5d93 100644 --- a/index.php +++ b/index.php @@ -5,6 +5,11 @@ * https://github.com/klaussilveira/gitlist */ +// Set the default timezone for systems without date.timezone set in php.ini +if (!ini_get('date.timezone')) { + date_default_timezone_set('UTC'); +} + require 'vendor/autoload.php'; $app = require 'boot.php'; $app->run(); \ No newline at end of file