php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #53763 mktime documented inputs are wrong
Submitted: 2011-01-17 02:47 UTC Modified: 2011-01-17 05:07 UTC
From: anthony dot mills at acidgreen dot com dot au Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 5.3SVN-2011-01-17 (snap) OS: Ubuntu
Private report: No CVE-ID: None
 [2011-01-17 02:47 UTC] 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 ]]]]]]] )



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-17 05:07 UTC] aharvey@php.net
-Status: Open +Status: Bogus
 [2011-01-17 05:07 UTC] aharvey@php.net
No, it's right. Really and truly. It's month, then day, then year.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 11:00:02 2026 UTC