php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #948 mktime returns incorrect datestamps when passed months like 09 instead of 9
Submitted: 1998-11-23 23:55 UTC Modified: 1998-11-24 00:01 UTC
From: cmlambertus at ucdavis dot edu Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.5 OS: Solaris 2.6
Private report: No CVE-ID: None
 [1998-11-23 23:55 UTC] cmlambertus at ucdavis dot edu
while writing a small mysql query module i discovered
that calling mktime(0,0,0,09,0,1998) instead of 
mktime(0,0,0,9,0,1998) reported a very incorrect
timestamp of 880876800. calling it with 9 instead of
09 returned the correct timestamp as verified by
C ctime().

-chris

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-11-24 00:01 UTC] rasmus
Because 09 is a bogus octal number.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 01:01:30 2024 UTC