Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 607453 - php mktime() is limited to 32-bit timestamps (1900-2038) on 64-bit systems
php mktime() is limited to 32-bit timestamps (1900-2038) on 64-bit systems
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: php (Show other bugs)
5.5
x86_64 Linux
low Severity medium
: rc
: ---
Assigned To: Joe Orton
BaseOS QE - Apps
:
: 622597 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-24 02:35 EDT by Travers Carter
Modified: 2012-02-21 01:29 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-21 01:29:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0249 normal SHIPPED_LIVE php bug fix and enhancement update 2012-02-20 10:07:10 EST

  None (edit)
Description Travers Carter 2010-06-24 02:35:41 EDT
Description of problem:
PHP's mktime() function (and probably other date-time functions) is limited to the 32-bit timestamp range, even on 64-bit platforms (eg x86_64), this is a regression from php 4, where 64-bit timestamps were supported on 64-bit platforms.

The problem appears to be a missing "#include <limits.h>" in ext/date/lib/timelib.h, causing it to fall back on a hardcoded 32-bit definition of LONG_MAX.

This #include appears to have been added in PHP 5.2.6
http://svn.php.net/viewvc/php/php-src/tags/php_5_2_6/ext/date/lib/timelib.h?view=markup

See lines 25-27 of the above


Version-Release number of selected component (if applicable):
php-5.1.6-27.el5

How reproducible:
Always

Steps to Reproduce:
1. Run php -r 'var_dump(mktime(1, 1, 1, 1, 1, 2039));'
  
Actual results:
bool(false)

Expected results:
int(2177416861)

Additional info:
Comment 1 Joe Orton 2010-06-24 08:21:33 EDT
Thanks for the report, and for tracking down the problem.
Comment 3 RHEL Product and Program Management 2010-08-09 15:13:48 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 6 Joe Orton 2011-12-16 10:01:04 EST
*** Bug 622597 has been marked as a duplicate of this bug. ***
Comment 8 errata-xmlrpc 2012-02-21 01:29:43 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0249.html

Note You need to log in before you can comment on or make changes to this bug.