|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28416 mktime doesn't handle three digit years correct
Submitted: 2004-05-16 20:23 UTC Modified: 2004-11-15 16:52 UTC
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: Assigned: derick (profile)
Status: Wont fix Package: Date/time related
PHP Version: 4.3.6 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2004-05-16 20:23 UTC]
mktime() doesn't handle three digit year values correct.

Reproduce code:

var_dump(date("Y", mktime(1, 2, 3, 4, 5, 123)));'


Expected result:
string(4) "2123"

Actual result:
string(4) "2023"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-15 16:52 UTC]
This can not be fixed, because the unsigned int range does not extend to the year "123".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 12:01:28 2024 UTC