|  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
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: andrew at cybergroups dot net
New email:
PHP Version: OS:


 [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-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 09 01:01:27 2023 UTC