php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2621 mktime returns -1 for dates beyond Jan 2038
Submitted: 1999-10-27 12:27 UTC Modified: 1999-10-27 12:29 UTC
From: mweltin at zipee dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.12 OS: linux RH 6.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mweltin at zipee dot com
New email:
PHP Version: OS:

 

 [1999-10-27 12:27 UTC] mweltin at zipee dot com
print "jan 8888>>>>>".  mktime(0,0,0,1,1,8888)." <br>";
print "jan 2038>>>>>".  mktime(0,0,0,1,1,2038) . "<br>";
print "feb 2038>>>>>".  mktime(0,0,0,2,1,2038) . "<br>";
print "Jan 2039>>>>>".  mktime(0,0,0,1,1,2039) . "<br>";

This code returns the following values
 
jan 8888>>>>>-1
jan 2038>>>>>2145934800
feb 2038>>>>>-1
Jan 2039>>>>>-1


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-27 12:29 UTC] andrei at cvs dot php dot net
As designed. Unix dates don't go past 2038.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 21:00:01 2026 UTC