php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1876 date() function returns Dec-1969 for years below 1902.
Submitted: 1999-07-26 09:40 UTC Modified: 1999-07-26 15:52 UTC
From: joel at joelryan dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.7 OS: Debian
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: joel at joelryan dot com
New email:
PHP Version: OS:

 

 [1999-07-26 09:40 UTC] joel at joelryan dot com
The following line reproduces the problem.

echo date('M-Y',mktime(0,0,0,1,1,1901))

This line works correctly.

echo date('M-Y',mktime(0,0,0,1,1,1902))


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-07-26 15:52 UTC] rasmus at cvs dot php dot net
This is a limitation of your system.  Your system problem uses 32-bit integer to represent
times and this you can only handle dates that are 1970 +- 68 years.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 10:00:01 2026 UTC