ID: 23139 Updated by: [EMAIL PROTECTED] Reported By: david at acz dot org -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: FreeBSD 4.8 PHP Version: 4.3.2RC1 New Comment:
This bug has been fixed in CVS. In case this was a PHP problem, 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/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2003-04-14 19:50:28] [EMAIL PROTECTED] strtotime() support MANY date formats, but it is by no means omnipotent and cannot support any date format imagined. I am marking this is a feature request for when someone decides to rewrite the strtotime() date parser. ------------------------------------------------------------------------ [2003-04-09 21:50:42] david at acz dot org I received that date in a "Date" header in an email (from SpamCop). strtotime() is the only function available in PHP to parse arbitrary dates. As such, it would be very useful if it did a better job with dates in weird formats. I wrote a fallback parser that works by examining each element of the date and determining what part of the date it could be (month, day, time, etc.). I would be happy to use this method to extend strtotime(), or add another function, such as parsetime(). Would such a contribution be added to PHP? I expect strtotime() to be able to parse any date that I can. This is possible with a few heuristics. ------------------------------------------------------------------------ [2003-04-09 16:52:38] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. . ------------------------------------------------------------------------ [2003-04-09 16:17:03] michael dot mauch at gmx dot de Does it work for you with any other date/time in your format, i.e. with the time in the middle of the date? It doesn't here, neither with 4.3.2-RC nor with 4.2.3, and I didn't find any reference to that format in the manual, so I guess strtotime() is not meant to be used with such a format. ------------------------------------------------------------------------ [2003-04-09 13:46:24] david at acz dot org strtotime() cannot parse the following date: Tue Apr 1 04:52:01 2003 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=23139&edit=1