|
From: | GNU bug Tracking System |
Subject: | bug#54916: closed (4 invalid dates reported by "date") |
Date: | Wed, 13 Apr 2022 19:20:02 +0000 |
Your message dated Wed, 13 Apr 2022 12:19:38 -0700 with message-id <8f847fc7-f985-a0b9-43b5-f96982dea15d@cs.ucla.edu> and subject line Re: bug#54916: 4 invalid dates reported by "date" has caused the debbugs.gnu.org bug report #54916, regarding 4 invalid dates reported by "date" to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs@gnu.org.) -- 54916: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=54916 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems
--- Begin Message ---Subject: 4 invalid dates reported by "date" Date: Wed, 13 Apr 2022 16:30:04 +0300 Hello software maintainers. User-agent: Inbox.lv Webmail
While using a script that relies upon the "date" utility to reconstruct historical calendar dates, I came across errors when submitting only the first day of the month April for the years 1981, 1982, 1982 and 1984. I assume no April fools is intended here for public domain software!
Here is a transcript of test dates that supposedly are not a radical departure from mostly free human readable date strings I use in the bash shell:
On a Lenovo x250:
ozoma@ozoma-ThinkPad-X250:$ date +%s --date="1980-04-01"
323384400
ozoma@ozoma-ThinkPad-X250:$ date +%s --date="1981-04-01"
date: invalid date ‘1981-04-01’
ozoma@ozoma-ThinkPad-X250:$ date +%s --date="1982-04-01"
date: invalid date ‘1982-04-01’
ozoma@ozoma-ThinkPad-X250:$ date +%s --date="1983-04-01"
date: invalid date ‘1983-04-01’
ozoma@ozoma-ThinkPad-X250:$ date +%s --date="1984-04-01"
date: invalid date ‘1984-04-01’
ozoma@ozoma-ThinkPad-X250:$ date +%s --date="1984-04-02"
449697600
ozoma@ozoma-ThinkPad-X250:$ date +%s --date="1985-04-01"
481147200
rc linux-image-unsigned-4.4.0-194-generic 4.4.0-194.226+8.0trisquel3 amd64 Linux-libre kernel image for version 4.4.0
-------------------
I also observed the same results as described above on all other systems and other laptops in my possession:
acer: 4.15.0-166.174+9.0trisquel9
asus: 4.4.0-197.229_8.0trisquel3
asus: 5.4.0-91.102+10.0trisquel9
----------------------
Hopefully my usage of the date utility is not in some way abnormal.
Regards.
Martins
--- End Message ---
--- Begin Message ---Subject: Re: bug#54916: 4 invalid dates reported by "date" Date: Wed, 13 Apr 2022 12:19:38 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 On 4/13/22 06:30, Martins Ozolins via GNU coreutils Bug Reports wrote:ozoma@ozoma-ThinkPad-X250:$ date +%s --date="1981-04-01" date: invalid date ‘1981-04-01’This is because your invocation is equivalent to: date +%s --date="1981-04-01 00:00:00" and there was no midnight at that date in Latvia.
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |