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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-28 21:08 UTC] jah@php.net
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 Dec 21 14:01:32 2024 UTC