Re: Dates - adding to unix 86400 seconds not equal nextday
| From: | ioannes | Date: | Wed, 01 Sep 2004 13:11:51 +0000 |
| Subject: | Re: Dates - adding to unix 86400 seconds not equal nextday | ||
| References: | 1 2 3 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-35986@lists.php.net to get a copy of this message | ||
When I run this code I get:
31 10 2004
31 10 2004
http://www.shortstay-london.com/testdates.php
----- Original Message ----- From: "Craig Brothers" <cbrothers@autorevenue.com>
To: "ioannes" <ioannes@btinternet.com>
Cc: <php-db@lists.php.net>
Sent: Wednesday, September 01, 2004 2:00 PM
Subject: Re: [PHP-DB] Dates - adding to unix 86400 seconds not equal nextday
what are you seeing for output? When I run your code I get the following 30 10 2004 31 10 2004 running on Fedora Core 1, Apache 2.0.5, PHP 5.0.1 -- Craig Brothers cbrothers@autorevenue.com On Wed, 2004-09-01 at 08:49, ioannes 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