php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69078 strtotime() doesn't work - Integer limited to 32bit on a 64bit windows
Submitted: 2015-02-19 09:30 UTC Modified: 2015-02-19 13:30 UTC
From: djbrainnrg at gmail dot com Assigned: ab (profile)
Status: Closed Package: Unknown/Other Function
PHP Version: 5.6.6RC1 OS: Windows 7 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: djbrainnrg at gmail dot com
New email:
PHP Version: OS:

 

 [2015-02-19 09:30 UTC] djbrainnrg at gmail dot com
Description:
------------
I'm aware of the year 2038 problem in PHP because of the 32bit limitation of integer values. I know that i need a 64bit system to make it working. 
Well, i've done so.

I've installed 
* Apache 2.4.12 Win64  
* PHP Version 5.6.6RC1 - Thread Safe 64bit for windows
* Running on Windows 7 64bit 

And my problem is, strtotime still cannot handle dates higher than year 2038. Reason is because the system simple work with 32bit integer limit. It doesn't matter that all is running in 64bit, still not working.

Here is my phpinfo
http://i.stack.imgur.com/LN1wS.png

Test script:
---------------
That should return true, but does return false.
var_dump(intval("9223372036854775807")==9223372036854775807);

That should return an integer, but return false because the integer is greater than a 32bit integer.
var_dump(strtotime("2038-11-01"));

Expected result:
----------------
64bit integer values

Actual result:
--------------
32bit integer limit on a 64bit system

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-02-19 09:33 UTC] djbrainnrg at gmail dot com
-Summary: strotime() doesn't work - Integer limited to 32bit on a 64bit windows +Summary: strtotime() doesn't work - Integer limited to 32bit on a 64bit windows
 [2015-02-19 09:33 UTC] djbrainnrg at gmail dot com
fixed typo
 [2015-02-19 13:30 UTC] ab@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: ab
 [2015-02-19 13:30 UTC] ab@php.net
The fix for this bug has been committed.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Thanks for reporting. Note that with PHP5 even 64 bit Windows builds have PHP_INT_SIZE == 4, so this won't fix in PHP5.

However it would be great if you could check some latest x64 master snaps like http://windows.php.net/downloads/snaps/master/r400e65e/ and report bugs. Those builds have full 64 bit support also in other areas, see http://git.php.net/?p=php-src.git;a=blob;f=UPGRADING;hb=HEAD .

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