Based on the definition given on php.net about function date(), I tried to use it in the code like this:
echo"The date is :".date("l, d/m/Y, h:i:s a", time());
But the timestamp doesn't get printed. Why is this? I am unable to understand this part of the function.
To print timestamp just use time()
echo time();
I understood the problem: I had to written the code properly but since It was not displaying current date and time, I was confused. I set the time zone to Asia/Kolkata. Now its working fine. Thank you everyone for help.