#35499 [Asn]: strtotime with newline fails

From: Date: Thu, 01 Dec 2005 13:55:25 +0000
Subject: #35499 [Asn]: strtotime with newline fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-89576@lists.php.net to get a copy of this message
 ID:               35499
 Updated by:       nlopess@php.net
 Reported By:      stabthecat at hotmail dot com
 Status:           Assigned
 Bug Type:         Date/time related
 Operating System: Windows / Linux
 PHP Version:      5.1.1
 Assigned To:      iliaa
 New Comment:

http://mega.ist.utl.pt/~ncpl/php_35499_patch.txt


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

[2005-12-01 01:22:59] stabthecat at hotmail dot com

Description:
------------
Since version 5.1

strtotime("11/20/2005 8:00 AM\r\n"); 

fails, and returns null

strtotime(trim("11/20/2005 8:00 AM\r\n")); 

fixes it




Reproduce code:
---------------
print(strtotime("11/20/2005 8:00 AM\r\n")); 


Expected result:
----------------
1132488000



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


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


Thread (4 messages)

« previous php.bugs (#89576) next »