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
 [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

Pull Requests

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: Sat Dec 21 13:01:31 2024 UTC