Codeignitor fix for session mktime() default timezone error

Codeignitor fix for session mktime() default timezone error

This is a fix for everyone that get the error below this may not be the solution for everybody but worked for me.


mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.



Open you main index.php and down the bottom add the follow reload and watch the errors disappear.


// SET CODEIGNITORS DEFAULT TIMEZONE SAMUEL EAST
if( ! ini_get('date.timezone') )
{
   date_default_timezone_set('GMT');
}