Using various formatting strings with date().
<?php
$time = time();
$formats = array('U','r','c','l, F jS, Y, g:i A','H:i:s D d M y','m/j/y g:i:s O (T)' );
foreach($formats as $format)
echo "<p><b>$format</b>: " . date($format, $time) . "</p>\n";
?>
Related examples in the same category