#37317 [Opn->Bgs]: mktime problem
| From: | tony2001@php.net | Date: | Thu, 04 May 2006 23:22:54 +0000 |
| Subject: | #37317 [Opn->Bgs]: mktime problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-96626@lists.php.net to get a copy of this message | ||
ID: 37317
Updated by: tony2001@php.net
Reported By: ramsessivira at yahoo dot com
-Status: Open
+Status: Bogus
Bug Type: Date/time related
Operating System: windows xp
PHP Version: 5.1.3
New Comment:
Yes, because in 2038 integer overflow is going to happen.
Previous Comments:
------------------------------------------------------------------------
[2006-05-04 23:20:07] ramsessivira at yahoo dot com
Description:
------------
For years up to 2038 the mktime instruction does not give back any
result
Reproduce code:
---------------
for($x=2037;$x<2041;$x++){
echo mktime(0,0,0,1,1,$x)." Date: ".date(
"M-d-Y",mktime(0,0,0,1,1,$x))."<br>";
}
Expected result:
----------------
2114395200 Date: Jan-01-2037
2145931200 Date: Jan-01-2038
some value Date: Jan-01-2039
some value Date: Jan-01-2040
Actual result:
--------------
2114395200 Date: Jan-01-2037
2145931200 Date: Jan-01-2038
Date: Dec-31-1969
Date: Dec-31-1969
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37317&edit=1