Display Current Indian Standard Time using 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.
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