ID: 27634 Updated by: [EMAIL PROTECTED] Reported By: kingoleg at mail dot ru -Status: Open +Status: Bogus Bug Type: Date/time related Operating System: All PHP Version: 4.3.4 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php strtotime doesn't support it. Previous Comments: ------------------------------------------------------------------------ [2004-03-18 11:02:34] kingoleg at mail dot ru Description: ------------ strtotime() do not correct work with MySQL datetime(14). Founded in Smarty shared.make_timestamp.php: function smarty_make_timestamp($string) { //Skiped $time = strtotime($string); //For date before 20040318000000 return -1 //After 20040318100000 return timestamp if (is_numeric($time) && $time != -1) return $time; // is mysql timestamp format of YYYYMMDDHHMMSS? if (preg_match('/^\d{14}$/', $string)) { //Skiped } } Reproduce code: --------------- Type this code: <?php $t = strtotime('20040318000000'); echo $t; echo "<br>" $t = strtotime('20040318100000'); echo $t; ?> Expected result: ---------------- -1 149979600 Actual result: -------------- -1 -1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27634&edit=1
