|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39309 strtotime function bug
Submitted: 2006-10-30 15:23 UTC Modified: 2006-10-30 16:56 UTC
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: thebogu at gmail dot com Assigned:
Status: Wont fix Package: Date/time related
PHP Version: 4.4.4 OS: Windows XP SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: thebogu at gmail dot com
New email:
PHP Version: OS:


 [2006-10-30 15:23 UTC] thebogu at gmail dot com
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:
	$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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-30 15:34 UTC]
Please try using this CVS snapshot:
For Windows:
 [2006-10-30 16:23 UTC] thebogu at gmail dot com
I cant go for php5, I'll use a different approach, I notice the bug, I saw nobody reported it, I thought giving a try.

Anyway, thanks for reply ...
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 20:01:29 2024 UTC