Re: Dates - adding to unix 86400 seconds not equal next day
| From: | John Holmes | Date: | Wed, 01 Sep 2004 13:07:20 +0000 |
| Subject: | Re: Dates - adding to unix 86400 seconds not equal next day | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35984@lists.php.net to get a copy of this message | ||
From: "ioannes" <ioannes@btinternet.com>
<? //unix date is 1099177200 seconds since 01/01/1970 //date based on unix 31 10 2004 $thisdate=date("d m Y",1099177200); print($thisdate); $next=1099177200+60*60*24; //86400 //add 86400 should give next unix date //date based on this is also 31 10 2004 print("<br>"); $thisdate=date("d m Y",$next); print($thisdate); ?>I get 30 10 2004 31 10 2004 So what's the issue? You could also use this: print(date('d m Y H:i:s')); print('<bra />'); print(date('d m Y H:i:s',strtotime('+1 day'))); ---John Holmes...