RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1124882 - date fails to parse dates bigger than INT_MAX on 32bit arch
Summary: date fails to parse dates bigger than INT_MAX on 32bit arch
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: coreutils
Version: 7.2
Hardware: Unspecified
OS: Linux
medium
high
Target Milestone: alpha
: 7.4
Assignee: Kamil Dudka
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-30 14:32 UTC by Aleš Mareček
Modified: 2020-12-15 07:31 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-12-15 07:31:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Aleš Mareček 2014-07-30 14:32:46 UTC
Description of problem:
date fails to parse dates bigger than INT_MAX (2147483647), 32-bit architecture.

Version-Release number of selected component (if applicable):
Always

How reproducible:
coreutils-8.4-31.el6.i686
date (GNU coreutils) 8.4

Steps to Reproduce:
1. date -d "2038-01-19 04:14:08" "+%s"

Actual results:
date: invalid date `2038-01-19 04:14:08'

Expected results:
2147483648

Additional info:
i:i386|m:i686 root@x86-64-v06 [~]# date -d "2038-01-19 04:14:07" "+%s"
2147483647
i:i386|m:i686 root@x86-64-v06 [~]# date -d "2038-01-19 04:14:08" "+%s"
date: invalid date `2038-01-19 04:14:08'

Comment 2 Pádraig Brady 2014-07-30 16:31:40 UTC
The limitation here stems from the glibc and kernel representation of time_t
which on 32 bit x86 at least is long, i.e. 31 bits.

Now theoretically we could work around this by defining time64_t, mktime64(), localtime64() in gnulib, and parse_datetime() etc. would use those.

Those functions in turn could call out to _time64() on windows,
or otherwise on signed 32 bit time_t systems, handle at least the 32 bit wrap,
thus handling dates until 2106.

We could split the problem by only implementing mktime64() in gnulib,
and thus supporting absolute times like in the above report without
needing to worry about the kernel interface required for relative times.

Though would it be worth doing that, when 64 bit supports this already?

What's the use case for this exactly?

Comment 4 Aleš Mareček 2014-07-31 09:19:19 UTC
Greetings,
thank you for your quick response at first.
We use this datetime functions in certificate testing what is broken on 32-bit archs. Timestamp is basic commonly used data type and shouldn't be faulty.
Thanks and Regards!

Comment 9 RHEL Program Management 2020-12-15 07:31:01 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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