php.net |  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
 [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!!!




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-16 04:00 UTC] derick@php.net
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 http://www.php.net/support.php

Thank you for your interest in PHP.

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

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 23:01:28 2024 UTC