time zone set in codeigniter

To set the time zone in CodeIgniter, you can follow the steps below:

  1. Open the config.php file: This file is located in the application/config directory of your CodeIgniter project.

  2. Search for the $config['time_reference'] line: This line is responsible for setting the time zone reference in CodeIgniter.

  3. Set the time zone reference: By default, the value of $config['time_reference'] is set to 'local', which means it uses the server's time zone. You can change this value to 'UTC' if you want to use UTC time zone.

  4. Save the changes: Once you have made the necessary changes, save the config.php file.

That's it! You have successfully set the time zone in CodeIgniter. The time zone reference you set will be used throughout your application to handle date and time operations.