How to get Current Indian time in PHP

First set time zone for India

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

Full code

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

Your email address will not be published.

4 Comments
  1. abbas Uddin says

    Hello , my name is Abbas and as a profession i am web developer , thanks to phpgurukul , bcs of lot of solution i get , specially in php .

  2. Anand mohan says

    Waoo Great Sir

  3. Techno Drollness says

    useful knowledge I get it

  4. Aabid Ansari says

    wow great sir

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy