my project is hosted on shared server and i want to change the timezone to Asia/Kolkata. i have tried setting timezone using htaccess file but failed.
Yeah thanks, i try in my controller like this :
if (!defined('BASEPATH'))
exit('No direct script access allowed');
/*
* Description of Testime
* @class Testing
*/
class Testing extends CI_Controller {
public function __construct() {
parent::__construct();
date_default_timezone_set('Asia/Jakarta');
}
public function index(){
echo date('Y-m-d H:i:s');
}
}
And works :)