From 0d81614afdb483092a0bc8458b2b7091940fa403 Mon Sep 17 00:00:00 2001 From: Gautham Warrier Date: Sun, 16 Feb 2014 23:22:32 +0530 Subject: [PATCH] Remove date() Warnings during Static Generation --- libs/functions.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/functions.php b/libs/functions.php index b64e473..b9e9c48 100644 --- a/libs/functions.php +++ b/libs/functions.php @@ -29,6 +29,13 @@ if (isset($_SERVER['SCRIPT_NAME'])) $base_url = substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'] , '/')); // find the full URL to this application from server root } +// Hide annoying date() Warnings due to no Timezone being set. +if( ! ini_get('date.timezone') ) +{ + date_default_timezone_set('GMT'); +} + + function get_base_url() { global $base_url;