Apply this code in your parent construct
date_default_timezone_set('America/Los_Angeles');
It will be helpful to set default time zone in Codeigniter.
For example:
<?php public function __construct(){ parent::__construct(); $this->load->helper(array('url','form')); $this->load->library('session'); date_default_timezone_set('America/Los_Angeles'); } ?>
Hope it will be helpful for you.
Question and answer is powered by AnsPress.io