PHP Date and Time
To display the current date
and time in a specified format, use the
date function.
The format is specified using control commands (English letters), and any separators can be inserted between them (hyphens, colons, and so on).
Let's output the current date-time in the format
'hours:minutes:seconds day.month.year':
<?php
echo date('H:i:s d.m.Y');
?>
You can see all the commands in the PHP Manual, here: the date function.