I'm trying to display the date and clock in my col-md-3 with my current timezone (Asia/Makassar) and using 24 hour format.
<?php
$dateToday = date("D, d M Y H:i:s");
echo $dateToday;
?>
This is what I expected:
Sat, 2 Jan 2016 10:16:02
I'm trying to display the date and clock in my col-md-3 with my current timezone (Asia/Makassar) and using 24 hour format.
<?php
$dateToday = date("D, d M Y H:i:s");
echo $dateToday;
?>
This is what I expected:
Sat, 2 Jan 2016 10:16:02
You must pass a string to the date object:
$dateToday=date("D, d M Y H:i:s");
Also note that PHP will show the date according to the timezone of the server, not the client. You can override this to a different timezone if you would like:
http://php.net/manual/en/function.date-default-timezone-set.php