|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19427 function mktime() returns bad timestamp
Submitted: 2002-09-16 03:50 UTC Modified: 2002-09-16 04:00 UTC
From: david dot vach at centrum dot cz Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.2.2 OS: windows as well as linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: david dot vach at centrum dot cz
New email:
PHP Version: OS:


 [2002-09-16 03:50 UTC] david dot vach at centrum dot cz
I found this:

function mktime() returns bad timestamp

for this code :
echo "time:".date("m.d. Y H:m:s",mktime(0, 0, 0, 9, 16, 2002));

should be the result like: 16.09. 2002 00:00:00

but the result is: 16.09. 2002 00:09:00

So the diferent is 9 minutes!!

if you try:

echo "time:".date("d.m. Y H:m:s",mktime(0, 0, 0, 4, 9, 2001));

the result is: 4.9. 2002 00:04:00

but it shoul be: 4.9. 2002 00:00:00

So the diferent is 4 minutes!!!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-16 04:00 UTC]
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit

Thank you for your interest in PHP.

Try H:i:s instead (\"m\" if month already).

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 22:01:29 2024 UTC