Subscribe For Free Updates!

We'll not spam mate! We promise.

Jul 11, 2013

Display Current Indian Standard Time using PHP

Display Current Indian Standard Time using PHP :

display indian standard time php


 The following code is used to get the current indian standard time using php.
here the default_timezone_set() function is used to set the country to set the particular time or date of that country.


<?php
date_default_timezone_set('Asia/Calcutta');
echo date("h:i a");
?>

Output of above code is :

06:40 pm

if you want capital letters of am/pm then you just use date("h:i A"). This will return 06:40 PM.

TechniqZone Socializer Widget
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

1 comments:

  1. Hii I need IST time if i am changing he time of my system the output above code changes so it is useless for me

    ReplyDelete