Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199903

[PHP3] Time difference question From: Alan Wicks (aswicks <email protected>)
Date: 03/11/99

Greetings,

I need to know when a record should be removed. The default
is after 35 days. So, I used

        $now = mktime(0,0,0,date("m"),date("d"),date("Y"));

to determine what the date is now.

I then used:

$fromnow = mktime(0,0,0,date("m"),date("d")+35,date("Y"));

to know when 35 days is from now.

But, when I look at $difference = ($fromnow - $now)/86400
 //86400 is the number of seconds in a day
the answer is always something like 34.958 days. Why not
35?

Thanks,

Alan Wicks

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>