#26198 [Asn->Csd]: strtotime returning invalid timestamp
| From: | iliaa@php.net | Date: | Wed, 12 Nov 2003 02:59:36 +0000 |
| Subject: | #26198 [Asn->Csd]: strtotime returning invalid timestamp | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-50247@lists.php.net to get a copy of this message | ||
ID: 26198
Updated by: iliaa@php.net
Reported By: resident at telcontar dot net
-Status: Assigned
+Status: Closed
Bug Type: Date/time related
Operating System: Linux
PHP Version: 4.3.3
Assigned To: iliaa
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-11-11 03:26:47] alan at akbkhome dot com
This might be a bit to difficult to fix.. and lead to yet more
ambiguous results....
1 Oct = 1 Oct 2003 (this year)
03 Oct .. is this 2003/or 3rd..?
2003 Oct ... 2003 days after 0th of Oct...
Input checking may be the only option here..
------------------------------------------------------------------------
[2003-11-11 03:15:11] resident at telcontar dot net
Description:
------------
I realise you've been making changes to strtotime() in PHP (I'm in Mac
OS 9.1 - can't run a CVS copy), but you may still want to check to see
what the new version makes of date strings with no day specified
(someone tried to use such a string on my site) - I'm getting a
timestamp from an unrelated day several years into the future. See the
code specified.
Reproduce code:
---------------
echo strtotime("Oct 2001");
Expected result:
----------------
Not sure. Either -1, or the timestamp for 1st October 2001 - probably
the latter.
Actual result:
--------------
1237737600
this gives:
07:16 am: *** Unix time "1237737600": Sunday, March 22, 2009 @ 04:00:00
pm
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26198&edit=1