php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51230 OVERLOAD using date() function with big integer, CPU 100%
Submitted: 2010-03-07 19:18 UTC Modified: 2010-03-08 00:16 UTC
From: dimitry at bansikov dot de Assigned:
Status: Duplicate Package: Date/time related
PHP Version: 5.2.13 OS: Debian5 64bit
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: dimitry at bansikov dot de
New email:
PHP Version: OS:

 

 [2010-03-07 19:18 UTC] dimitry at bansikov dot de
Description:
------------
On 64bit OS and using data() function with big integer as timestamp - php come to overload (infinitely runtime + use CPU 100%) 
Please fix this bug, limit max timestamp as parameter.
To check on 64bit OS:  date("d.m.Y",100000000000000000);

Test script:
---------------
<? echo date("d.m.Y",100000000000000000); ?>


Patches

nopatch (last revision 2010-03-07 18:19 UTC by dimitry at bansikov dot de)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-07 19:22 UTC] derick@php.net
-Status: Open +Status: Duplicate
 [2010-03-07 19:22 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Duplicate of #48851.
 [2010-03-08 00:16 UTC] dimitry at bansikov dot de
Tnx for answer.
The solution is to use php5.3? But i need php5.2 :(
My problem is different to #48851
date("Y",10000000000000000); - execution time 1 sec
date("Y",100000000000000000); - execution time 10 sec
date("Y",1000000000000000000); - execution time 100 sec

maybe can you help and say where can i fix this problem?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 18:02:40 2024 UTC