PHP function to print current time

Here is the PHP function to print current time in Hour Minute formats


$time_value=date("h:i:a");
echo $time_value;
Output  01:40:pm

Here is the PHP function to print current time in Hour Minute secounds formats

echo date("h:i:sa");
Output  01:40:13pm

Setting default time zone in PHP

date_default_timezone_set('America/Los_Angeles');

My Thought

Your email address will not be published. Required fields are marked *

Our Tool : hike percentage calculator