bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#35289: closed (Re: bug#35289: date+%-Y -d "- N years" errors when N


From: Assaf Gordon
Subject: bug#35289: closed (Re: bug#35289: date+%-Y -d "- N years" errors when N > 111)
Date: Tue, 16 Apr 2019 07:37:15 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hello,

On 2019-04-15 5:10 p.m., O. Emmerson wrote:
For me it gives:

$ ./inv-year
time() = 1555369320
localtime() = 2019-04-16 00:02:00
                               (mday=16 wday=2, isdst=1)
struct tm (after adjustment) = 0009-04-16 00:02:00
                               (mday=16 wday=2, isdst=1)
inv-year: mktime() failed: Value too large for defined data type
>

On 2019-04-15 6:50 p.m., C de-Avillez wrote:
[...]
address@hidden:~# gcc -o inv-year inv-year.c
address@hidden:~# ./inv-year
time() = 1555375408
localtime() = 2019-04-16 00:43:28
               (mday=16 wday=2, isdst=0)
struct tm (after adjustment) = 0009-04-16 00:43:28
                                (mday=16 wday=2, isdst=0)
mktime() after date adjustment = -61874061392

So: a pristine 19.04 runs it. My laptop (which is my work machine,
full of other packages & programs), does not.


Thank you both for testing.

So, to summarize:
whenever "inv-year" fails - it is a problem with glibc on your
setup, *not* a problem in coreutils' date(1) program.

If there is a setup where "inv-year" succeeds but date(1) still fails,
then it is a problem in coreutils.

I'm glad to hear latest Ubuntu 19.04 is working fine
(though the reason for the earlier failure is still a mystery).

As Paul suggested, trying 'strace' on the failing system
might reveal more details.

regards,
 - assaf






reply via email to

[Prev in Thread] Current Thread [Next in Thread]