php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3092 mktime returns error value (-1) for some value of year
Submitted: 2000-01-03 12:57 UTC Modified: 2000-01-08 06:28 UTC
From: piarrech dot crepin at publicis-technology dot com Assigned:
Status: Closed Package: Other
PHP Version: 3.0.9 OS: solaris
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: piarrech dot crepin at publicis-technology dot com
New email:
PHP Version: OS:

 

 [2000-01-03 12:57 UTC] piarrech dot crepin at publicis-technology dot com
mktime(0,0,0,$mm,$dd,$YYYY) returns -1 (error) if $YYYY is inferior to 1901 or superior to 2039.

use of function date("Y", mktime(0,0,0,$mm,$dd,$YYYY))
with there values returns 1970.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-01-08 06:28 UTC] sas at cvs dot php dot net
The observed behaviour is correct. You can use mktime only for dates between the beginning of the epoch (1970) and the implementation limit (2038).
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 21:00:02 2026 UTC