php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28733 mktime returns error for args 4/1/2007 00:00:00
Submitted: 2004-06-10 20:39 UTC Modified: 2004-06-11 09:05 UTC
From: marcos at paladin-its dot com Assigned:
Status: Not a bug Package: Date/time related
PHP Version: 4.3.5 OS: Free BSD
Private report: No CVE-ID: None
 [2004-06-10 20:39 UTC] marcos at paladin-its dot com
Description:
------------
when passing the integers necessary to make a date of 4/1/2007, mktime returns an error value of 12/31/1969.

Reproduce code:
---------------
echo date("M-d-Y", mktime(0, 0, 0, 4, 1, 2007)) . "<br>";

Expected result:
----------------
Apr-01-2007

Actual result:
--------------
Dec-31-1969 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-11 09:05 UTC] derick@php.net
Sorry, but 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 as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This is not a bug in PHP, but in FreeBSD's mktime routines. But as you also did not specify your timezone, I can't even explain it.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Nov 30 13:00:01 2025 UTC