php.net |  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
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: helly@php.net 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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
34 - 1 = ?
Subscribe to this entry?

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

Reproduce code:
---------------
<?php

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

?>

Expected result:
----------------
string(4) "2123"

Actual result:
--------------
string(4) "2023"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-15 16:52 UTC] derick@php.net
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: Fri Apr 19 19:01:28 2024 UTC