date_default_timezone_set for india in php
snippet in php

date_default_timezone_set for india in php

user976

<?php
	date_default_timezone_set("Asia/Kolkata");   //India time (GMT+5:30)
	echo date('d-m-Y H:i:s');
?>

date_default_timezone_set india

user918

date_default_timezone_set('Asia/Kolkata');
$timestamp = date("Y-m-d H:i:s");

change timezone in php

user9253

 date_default_timezone_set("Asia/Bangkok");
echo date_default_timezone_get();