PHP Time Showing incorrect time
Posted: Sun May 10, 2009 11:20 am
Can anyone Tell me why when I run this code
The Output is "January 07th 1970 05:00:00 PM"
I am trying to get the differance from $current_time and $end_time_and_date
Thank You
Code: Select all
<?php
// a START time value
$end_time_and_date = time() + (7 * 24 * 60 * 60);
$current_time = time();
$diff = $end_time_and_date - $current_time;
$display_end_time_and_date = (date("F dS Y h:i:s A",$diff));
echo $display_end_time_and_date;
?>
I am trying to get the differance from $current_time and $end_time_and_date
Thank You