ID: 50534 Updated by: [email protected] Reported By: scripting at frag-em dot com -Status: Open +Status: Closed Bug Type: Date/time related Operating System: CentOS 4.3 PHP Version: 5.2.12 New Comment:
This bug has been fixed in SVN. 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. This is already fixed for PHP 5.3. Previous Comments: ------------------------------------------------------------------------ [2009-12-19 23:51:34] scripting at frag-em dot com Description: ------------ strtotime parses some forms of characters (probably as long as there is a separation with dots) to timestamps. If there's no real date, it fails to return false. date_default_timezone_set has been properly set Reproduce code: --------------- date_default_timezone_set('Europe/Amsterdam'); $time = strtotime("T.B.A."); var_dump($time); $time = strtotime("T.BA."); var_dump($time); $time = strtotime("TB.A."); var_dump($time); $time = strtotime("TBA"); var_dump($time); Expected result: ---------------- bool(false) bool(false) bool(false) bool(false) Actual result: -------------- int(somenumberthatchanges) int(somenumberthatchanges) bool(false) bool(false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50534&edit=1
