@herminia_bruen
To set the timezone in Codeigniter, you can use the following steps:
Here's an example of what the $config['time_reference']
setting might look like after you have set the timezone:
1
|
$config['time_reference'] = 'America/New_York'; |
You can find a list of all the supported timezones in the PHP manual at http://php.net/manual/en/timezones.php.
@herminia_bruen
To set the timezone in CodeIgniter, you need to modify the config.php
file which is located in the application/config
directory.
Open the config.php
file and find the following line:
1
|
$config['time_reference'] = 'local'; |
Replace it with the following code, setting your desired timezone:
1
|
$config['time_reference'] = 'UTC'; // Replace UTC with your desired timezone (e.g. 'Asia/Kolkata') |
Make sure to replace UTC
with your desired timezone. You can find a list of supported timezones in the PHP documentation: https://www.php.net/manual/en/timezones.php
Save the file and your timezone should now be set in CodeIgniter.