|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44209 strtotime doesn't support 64 bit timestamps
Submitted: 2008-02-22 09:00 UTC Modified: 2008-02-22 10:20 UTC
From: bishillo at gmail dot com Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 5.2CVS-2008-02-22 (snap) OS: linux 64 bit
Private report: No CVE-ID: None
 [2008-02-22 09:00 UTC] bishillo at gmail dot com
strtotime() of years >2038 or <1900 does not work on 64 bit platforms, that should not have problems with those dates. The rest of php functions work properly with those extended dates.

Reproduce code:
On 64 bit platforms php date functions support greater range of dates. For exampe:

<?= date('d-m-Y',time()+31536000000) ?>

But strtotime does not work with those improved date ranges:

<?= date('Y-m-d',strtotime('3007-06-25')) ?>

I understand that output on 32 bit platforms, but on 64 bit should work as the rest of functions, and return a valid 64bit timestamp for dates >2038 or <1900.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-22 09:23 UTC]
Weird, I was positive this was working.
 [2008-02-22 09:49 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.
 [2008-02-22 10:20 UTC] bishillo at gmail dot com
Woa! fixed in 49 minutes! Thats fast. Thx!
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Jul 03 09:04:06 2022 UTC