#39309 [Opn->Fbk]: strtotime function bug
| From: | derick@php.net | Date: | Mon, 30 Oct 2006 15:34:45 +0000 |
| Subject: | #39309 [Opn->Fbk]: strtotime function bug | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-104185@lists.php.net to get a copy of this message | ||
ID: 39309
Updated by: derick@php.net
Reported By: thebogu at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Date/time related
Operating System: Windows XP SP2
PHP Version: 4.4.4
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2006-10-30 15:23:33] thebogu at gmail dot com
Description:
------------
I tried a little script that parse all days since a certain date till
today, I get an infinite loop and after I debug the script I notice
that for 2006-03-25 if I use strtotime("+1 day") to get to the next day
it don't calculate the day correctly.
I'll the testing script below ...
Before reporting this bug I test this function under php 4.4.2 and php
4.4.4 under linux and is working corectly, the only problem I could
think of is the php 4.4.4 win vers ...
Reproduce code:
---------------
<?php
$time = "2006-03-25";
echo date("Y-m-d H:i:s",strtotime($time))."<br>";
echo date("Y-m-d H:i:s",strtotime("+1
day",strtotime($time)))."<br>";
?>
Expected result:
----------------
2006-03-25 00:00:00
2006-03-26 00:00:00
Actual result:
--------------
2006-03-25 00:00:00
2006-03-25 23:00:00
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39309&edit=1