How to set timezone in codeigniter?

263 Views

How to set timezone in codeigniter?

Codeigniter | Set timezone

To set default timezone in Codeigniter, you can add the date_default_timezone_set() function in your application/config.php or index.php file.

date_default_timezone_set('your timezone');
 
 <?php

// India timezone
date_default_timezone_set('Asia/Kolkata');

?>

 

Tags:-
Codeigniter