php - Not able to get indian standard time in codeigniter -
using this:
date_default_timezone_set('asia/kolkata');
is returning wrong time result. if real date time 2015-10-02 12:00:00
it's showing 2015-10-03 12:30:00
. how can right 'ist'?
it's giving utc time , while indian timezone utc + 5.30. have set timezone asia/calcutta in root index file.
<?php $indiatimezone = new datetimezone("asia/kolkata" ); $date = new datetime(); $date->settimezone($indiatimezone); echo $date->format( 'h:i:s / d, m js, y' ); ?>
Comments
Post a Comment