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
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: helly@php.net
New email:
PHP Version: OS:

 

 [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: Sat Apr 20 05:01:27 2024 UTC