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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -