Bug 195201 - timelib doesn't like dates past 2038-01-19
timelib doesn't like dates past 2038-01-19
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: php (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
bzcl34nup
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-14 10:38 EDT by Joe Orton
Modified: 2008-05-06 20:32 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-06 20:32:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joe Orton 2006-06-14 10:38:05 EDT
[refiled due to bugzilla snafu]

Description of problem:

timelib (ext/date/lib) doesn't seem to support dates and times past 2038-01-19.
This seems to be a deficiency in the timelib code.

timelib ensures that the timestamp falls between LONG_MIN/LONG_MAX.
Unforunately, even on 64bit systems, these values are capped at 32bits, as
timelib_structs.h doesn't include anything that externally defines these
(LONG_MIN/LONG_MAX) values.

This mismatches with the underlying Zend system, which seems to derive these
values from <limits.h>.

So, we include <limits.h> (patch attached) in timelib_structs.h and fix timelib.

How reproducible:

Always.

Steps to Reproduce:

<?php

  echo debug_zval_dump( gmmktime(0, 0, 0, 1, 19, 2038) );
  echo debug_zval_dump( gmmktime(0, 0, 0, 1, 20, 2038) );

?>

Actual results:

long(2147472000) refcount(1)
bool(false) refcount(1)

Expected results:

long(2147472000) refcount(1)
long(2147558400) refcount(1)
Comment 1 Bug Zapper 2008-04-03 13:23:46 EDT
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.
Comment 2 Bug Zapper 2008-05-06 20:32:26 EDT
This bug has been in NEEDINFO for more than 30 days since feedback was
first requested. As a result we are closing it.

If you can reproduce this bug in the future against a maintained Fedora
version please feel free to reopen it against that version.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

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