Get current Indian time in PHP



In this tutorial I will show you to get current indian time in PHP using DateTimeZone and DateTime function.

First get the DateTime object and set indian timezone to this DateTime object.

Now format the output as in the following example.

$indiatz = new DateTimeZone("Asia/Kolkata" );
$date = new DateTime();
$date->setTimezone($indiatz);
echo  $date->format( 'H:i:s A  /  D, M jS, Y' );