php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19414 mktime causes a crash for certian values.
Submitted: 2002-09-15 04:54 UTC Modified: 2002-09-19 13:26 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mike at graftonhall dot co dot nz Assigned:
Status: Closed Package: Date/time related
PHP Version: 4.2.3 OS: Windows 2000 SP2
Private report: No CVE-ID: None
 [2002-09-15 04:54 UTC] mike at graftonhall dot co dot nz
PHP version: 4.3.0-dev
PHP: 20020307
PHP Extension: 20020429
Zend Extension: 20020903
From snaps.php.net

Under windows mktime causes php to crash when it's result is greater than (2^32)-1 

ie:
    echo mktime(3,14,7,1,19,2038);
outputs 2147436847 ((2^32)-1)

on second into the future
    echo mktime(3,14,8,1,19,2038); 
crashes. should return 2^32

- Mike :-)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-15 05:06 UTC] mike at graftonhall dot co dot nz
Actually should probably return -1 as 4.2.4-dev does, as it is out of the range of a long.
 [2002-09-19 13:26 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 14:01:30 2024 UTC