#34874 [Csd]: strtotime("<Day>",<time>) output differs from earlier PHP5 versions

From: Date: Thu, 20 Oct 2005 08:09:17 +0000
Subject: #34874 [Csd]: strtotime("<Day>",<time>) output differs from earlier PHP5 versions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-86783@lists.php.net to get a copy of this message
ID: 34874 User updated by: dverspui at hotpop dot com Reported By: dverspui at hotpop dot com Status: Closed Bug Type: Date/time related Operating System: Linux (Fedora 2) PHP Version: 5.1.0RC1 Assigned To: derick New Comment: Thanks, works great! Previous Comments: ------------------------------------------------------------------------ [2005-10-19 23:11:10] derick@php.net This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2005-10-18 14:41:15] dverspui at hotpop dot com Hi Derick, I would agree if it would include "next" like in: print date("Ymd","next " . strtotime(date("l",time()),time())); I think people in many projects have been using my earlier example with all PHP versions prior to 5.1.0 and this breaks their code. E.g. I bumped into this when using PHP iCalender. After all, I cannot seem to find any exact specs on what strtotime should return for my example. The manual nowhere tells me that it will e.g. return next weeks tuesday if the specified time is on a tuesday. It will definitely returns a tuesday, but which one then?? ------------------------------------------------------------------------ [2005-10-18 13:54:25] derick@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php This was a bug in all earlier version. If today is "Tuesday October 18th" then the string "Tuesday" refers to the next one, which is October 25th. ------------------------------------------------------------------------ [2005-10-15 00:19:05] tony2001@php.net Looks like a feature, but I'm not sure. Please have a look. ------------------------------------------------------------------------ [2005-10-15 00:09:27] dverspui at hotpop dot com Hi, thanks for your reply. I succesfully compiled 5.1.0RC3-dev you gave me the link to, but the problem remains! ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/34874 -- Edit this bug report at http://bugs.php.net/?id=34874&edit=1

« previous php.bugs (#86783) next »