Doc #53763 [Opn->Bgs]: mktime documented inputs are wrong

From: Date: Mon, 17 Jan 2011 04:07:38 +0000
Subject: Doc #53763 [Opn->Bgs]: mktime documented inputs are wrong
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5826@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53763&edit=1 ID: 53763 Updated by: aharvey@php.net Reported by: anthony dot mills at acidgreen dot com dot au Summary: mktime documented inputs are wrong -Status: Open +Status: Bogus Type: Documentation Problem Package: Documentation problem Operating System: Ubuntu PHP Version: 5.3SVN-2011-01-17 (snap) Block user comment: N Private report: N New Comment: No, it's right. Really and truly. It's month, then day, then year. Previous Comments: ------------------------------------------------------------------------ [2011-01-17 02:47:09] anthony dot mills at acidgreen dot com dot au Description: ------------ --- From manual page: http://www.php.net/function.mktime#Description --- The documentation currently lists the correct inputs as: int mktime ([ int $hour = date("H") [, int $minute = date("i") [, int $second = date("s") [, int $month = date("n") [, int $day = date("j") [, int $year = date("Y") [, int $is_dst = -1 ]]]]]]] ) Which returns an incorrect timestamp for the date given with the month and the date inputs being around the wrong way. The correct format is: int mktime ([ int $hour = date("H") [, int $minute = date("i") [, int $second = date("s") [, int $day = date("j") [, int $month = month("n") [, int $year = date("Y") [, int $is_dst = -1 ]]]]]]] ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53763&edit=1

« previous php.doc.bugs (#5826) next »