Re: Dates - adding to unix 86400 seconds not equal next day
| From: | Pablo Rivas | Date: | Wed, 01 Sep 2004 13:09:15 +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-35985@lists.php.net to get a copy of this message | ||
I don't get you...
your code outputs:
"30 10 2004<br>31 10 2004"
so, y added..:
$next+=(60*60*24);
print("<br>");
$thisdate=date("d m Y",$next);
print($thisdate);
and the output is: "30 10 2004<br>31 10 2004<br>01 11 2004"
nice!!!!
Ref: Server: Apache/1.3.26 (Unix) PHP/4.3.8
On Wed, 1 Sep 2004 13:49:33 +0100, ioannes <ioannes@btinternet.com> wrote:
> Code:
>
> <?
> //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);
> ?>
>
> how come?
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Pablo M. Rivas. http://pmrivas.ipupdater.com
-----------------------------------------------------------
pmrivas@gmail.com -- pmrivas01@yahoo.com.ar --
pablorivas01@hotmail.com -- ICQ:1668030