How to Get Current Indian Time in PHP

How to Get Current Indian Standard Time using PHP

In this article, we will explain How to Get Current Indian Standard Time using PHP on web browser follow below code

Firstly Set Indian time zone:

date_default_timezone_set('Asia/Kolkata');

Now create a PHP date or time function :

date( 'd/m/Y h:i:s', time ());

Full Code in PHP

<?php
date_default_timezone_set('Asia/Kolkata');
$currentTime = date( 'd-m-Y h:i:s A', time () );
echo $currentTime;
?>

How to Fetch Data From Mysql Database using PHP

Leave A Reply