PHP Web Development

How to get Current Indian time in PHP

First set time zone for India

date_default_timezone_set('Asia/Kolkata');

Now create PHP date or time funtion as given below :

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;
?>

Recommended Tutorials for you


Related posts

Useful functions for arrays in PHP

Anuj Kumar

Password Hashing in PHP

Anuj Kumar

jQuery Dependent DropDown List – States and Districts

Anuj Kumar

Adding Comments to PHP Code

Anuj Kumar

PHP – PEAR

Anuj Kumar

How to change Password in php

Anuj Kumar

How to Salt & Hash a Password using Sha256

Anuj Kumar

How to Generate PDF from MySQL Data using PHP

Anuj Kumar

Store Procedure In PHP

Anuj Kumar

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.