Edit report at http://bugs.php.net/bug.php?id=53686&edit=1
ID: 53686 Updated by: ahar...@php.net Reported by: huarong at masalife dot com Summary: mktime(0,0,0, 12,32, 2010) means 2011 1 1 , is it reasonable? -Status: Open +Status: Bogus Type: Bug -Package: Unknown/Other Function +Package: Date/time related Operating System: centos5 PHP Version: 5.2.17 Block user comment: N Private report: N New Comment: That's how mktime() works. If you want to check the validity of a date, use checkdate(). Previous Comments: ------------------------------------------------------------------------ [2011-01-07 09:30:59] huarong at masalife dot com Description: ------------ --- >From manual page: http://www.php.net/function.mktime#Notes --- mktime(0,0,0, 12,32, 2010) means 2011 1 1 , is this reasonable? why not check the date first? Test script: --------------- print mktime(0,0,0, 12,32, 2010) - mktime(0,0,0, 12,31, 2010); //86400 Expected result: ---------------- return false . ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53686&edit=1