Beginner's question on what to add in a PHP time variable
<p>I found this script on php.net and finds the difference between now and a future day. My question is very simple, but is a sample time or how can I make that time that it is needed for the <code>$future_date</code> ? Also what is the purpose of -1970 ?</p>

<p>Also how can I show a message when the <code>future_date</code> is reached or passed?</p>

<pre><code>&lt;?php
function time_difference($endtime){
    $days= (date("j",$endtime)-1);
    $months =(date("n",$endtime)-1);
    $years =(date("Y",$endtime)-1970);
    $hours =date("G",$endtime);
    $mins =date("i",$endtime);
    $secs =date("s",$endtime);
    $diff="'day': ".$days.",'month': ".$months.",'year': ".$years.",'hour': ".$hours.",'min': ".$mins.",'sec': ".$secs;
    return $diff;
}   
$end_time = $future_date - time();
$difference = time_difference($end_time);
echo $difference;

//sample output
'day': 2,'month': 1,'year': 0,'hour': 2,'min': 05,'sec': 41

?&gt;
</code></pre>
