Calculate the difference between date/times in PHP
<p>I have a Date object ( from Pear)  and want to subtract another Date object to get the time difference in seconds.</p>

<p>I have tried a few things but the first just gave me the difference in days, and the second would allow me to convert one fixed time to unix timestamp but not the Date object.</p>

<pre><code>        $now = new Date();
        $tzone = new Date_TimeZone($timezone);
        $now-&gt;convertTZ($tzone);
        $start = strtotime($now);
        $eob = strtotime("2009/07/02 17:00"); // Always today at 17:00

        $timediff = $eob - $start;
</code></pre>

<p>** Note ** It will always be less than 24 hours difference.</p>
