|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6903 error with mktime function
Submitted: 2000-09-27 10:02 UTC Modified: 2000-09-28 21:08 UTC
From: andrew at cybergroups dot net Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.0.2 OS: Redhat 6.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
46 - 19 = ?
Subscribe to this entry?

 [2000-09-27 10:02 UTC] andrew at cybergroups dot net
The two following uses of the mktime function return entirely different values:

  mktime ("12","00","00","09","27","2000");
  mktime (12,00,00,09,27,2000);

The first returns "Sep-27-2000" as it should, but the second returns "Dec-27-1999" which is completely wrong. If I enter variables as the arguments, that works fine. It only seems to not work when the arguments aren't in double quotes.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-28 21:08 UTC]
This isn't a bug. 09 is a number in octal notation, and also a non-existent octal
number that will evaluate to 0. The 0th month of 2000 is considered to be
December 1999.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 05:01:31 2024 UTC