Wednesday, July 27, 2011

[phpXperts] Set default timezone in Codeigniter

 

Hello,

Thanks all for helping me find out a good solution regarding array sorting. Here is now another issue:

I want to set default time-zone in my codeigniter application so that Bangladesh-time could be displayed instead of default.
To do so I have put this line into main index.php file of codeigniter:
date_default_timezone_set('Asia/Dhaka');

Now I have put down following line into a controller:
$data['current_time'] = date("l j \of F Y h:i:s A");

I could see the default time-zone was changed.
But the problem is that it is displaying time of GMT +7:00 instead of GMT +6:00.

I am trying this in PHP 5.3.1 version with codeigniter 1.7.2  OS Windows 7.

Looking forward for a better solution.
 
Regards,

Md. Rafiqul Islam (Shohel)
GMG Airlines Ltd.
Cell: +880 1911745532

__._,_.___
Recent Activity:
Visit phpXperts website at www.phpxperts.net
.

__,_._,___

No comments: