Bug #53686 [Opn->Bgs]: mktime(0,0,0, 12,32, 2010) means 2011 1 1 , is it reasonable?

From: Date: Fri, 07 Jan 2011 08:38:06 +0000
Subject: Bug #53686 [Opn->Bgs]: mktime(0,0,0, 12,32, 2010) means 2011 1 1 , is it reasonable?
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-157730@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53686&edit=1 ID: 53686 Updated by: aharvey@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

« previous php.bugs (#157730) next »