ID:               37514
 Updated by:       [EMAIL PROTECTED]
 Reported By:      pcavit at gmail dot com
-Status:           Assigned
+Status:           Closed
 Bug Type:         Date/time related
 Operating System: FreeBSD 6
 PHP Version:      5.1.4
 Assigned To:      derick
 New Comment:

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.




Previous Comments:
------------------------------------------------------------------------

[2006-05-19 07:12:34] [EMAIL PROTECTED]

Definitely not a bug... in PHP 4 not even the first one works actually.
That doesn't mean we can't have a look if we can add support for this
format though.

------------------------------------------------------------------------

[2006-05-19 01:59:36] judas dot iscariote at gmail dot com

This seems to be the expected behaviour, as it returns -1 on
PHP4.4.3-dev,4.3,6 , and false in PHP 5.2-dev.however im not sure it is
the "desired" behaviour..;-)

------------------------------------------------------------------------

[2006-05-18 22:43:03] pcavit at gmail dot com

Description:
------------
When using strtotime to parse dates if an 'am' or 'pm' is added without
specifying a year false will be returned.

Reproduce code:
---------------
echo date('r', strtotime('May 18th 5:05'));
echo date('r', strtotime('May 18th 5:05pm'));
echo date('r', strtotime('May 18th 5:05 pm'));
echo date('r', strtotime('May 18th 5:05am'));
echo date('r', strtotime('May 18th 5:05 am'));
echo date('r', strtotime('May 18th 2006 5:05pm'));



Expected result:
----------------
Thu, 18 May 2006 05:05:00 -0700
Thu, 18 May 2006 17:05:00 -0700
Thu, 18 May 2006 17:05:00 -0700
Thu, 18 May 2006 05:05:00 -0700
Thu, 18 May 2006 05:05:00 -0700
Thu, 18 May 2006 17:05:00 -0700

Actual result:
--------------
Thu, 18 May 2006 05:05:00 -0700
Wed, 31 Dec 1969 16:00:00 -0800
Wed, 31 Dec 1969 16:00:00 -0800
Wed, 31 Dec 1969 16:00:00 -0800
Wed, 31 Dec 1969 16:00:00 -0800
Thu, 18 May 2006 17:05:00 -0700


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37514&edit=1

Reply via email to