On Tue, Apr 16, 2019 at 1:37 PM Assaf Gordon <assafgor...@gmail.com> wrote:
> 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. Will run strace again. Meanwhile, I decided to test time zones. My default TZ is America/Chicago -- in my laptop date fails. I then moved to TZ=UTC, and it worked: cerdea@piatam:~/Downloads$ echo $TZ America/Chicago cerdea@piatam:~/Downloads$ date Tue Apr 16 10:04:48 CDT 2019 130 cerdea@piatam:~/Downloads$ date --debug +%-Y -d '- 110 years' date: parsed relative part: -110 year(s) date: input timezone: TZ="America/Chicago" environment value date: using current time as starting value: '10:05:01' date: using current date as starting value: '(Y-M-D) 2019-04-16' date: starting date/time: '(Y-M-D) 2019-04-16 10:05:01' date: warning: when adding relative months/years, it is recommended to specify the 15th of the months date: error: adding relative date resulted in an invalid date: '(Y-M-D) 1909-04-16 10:05:01' date: invalid date ‘- 110 years’ 1 cerdea@piatam:~/Downloads$ export TZ=UTC cerdea@piatam:~/Downloads$ date --debug +%-Y -d '- 110 years' date: parsed relative part: -110 year(s) date: input timezone: TZ="UTC" environment value date: using current time as starting value: '15:05:21' date: using current date as starting value: '(Y-M-D) 2019-04-16' date: starting date/time: '(Y-M-D) 2019-04-16 15:05:21' date: warning: when adding relative months/years, it is recommended to specify the 15th of the months date: after date adjustment (-110 years, +0 months, +0 days), date: new date/time = '(Y-M-D) 1909-04-16 15:05:21' date: '(Y-M-D) 1909-04-16 15:05:21' = -1915865679 epoch-seconds date: timezone: TZ="UTC" environment value date: final: -1915865679.603138125 (epoch-seconds) date: final: (Y-M-D) 1909-04-16 15:05:21 (UTC) date: final: (Y-M-D) 1909-04-16 15:05:21 (UTC+00) 1909 Will keep on trying. -- ..hggdh..