Return to Snippet

Revision: 8650
at October 2, 2008 09:02 by Jaymoon


Initial Code
<?php

// Value of how many hours offset from server and local time
$hourdiff = "3";

// Offsetting time by seconds
$timeadjust = ($hourdiff * 3600);

// Format of date which will be displayed
$currentdate = date("l m/d/y",time() - $timeadjust);

// Display the output
print ("$currentdate");

?>

Initial URL

                                

Initial Description
For a complete list of time/date parameters, visit: http://php.net/manual/function.date.php

Initial Title
Show Current Date

Initial Tags
php, date

Initial Language
PHP