From unknown Mon Aug 18 17:58:20 2025 X-Loop: help-debbugs@gnu.org Subject: bug#54916: 4 invalid dates reported by "date" Resent-From: "Martins Ozolins" Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 13 Apr 2022 15:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54916 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 54916@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164986388225073 (code B ref -1); Wed, 13 Apr 2022 15:32:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Apr 2022 15:31:22 +0000 Received: from localhost ([127.0.0.1]:53674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neexm-0006WL-A5 for submit@debbugs.gnu.org; Wed, 13 Apr 2022 11:31:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:41404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ned4V-0002S7-Gy for submit@debbugs.gnu.org; Wed, 13 Apr 2022 09:30:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ned4V-0003Pf-AX for bug-coreutils@gnu.org; Wed, 13 Apr 2022 09:30:11 -0400 Received: from shark2.inbox.lv ([194.152.32.82]:51438) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ned4S-0001U3-Ma for bug-coreutils@gnu.org; Wed, 13 Apr 2022 09:30:10 -0400 Received: by shark2.inbox.lv (Postfix, from userid 2004) id E0E66C01C1; Wed, 13 Apr 2022 16:30:04 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=inbox.lv; s=p20220324; t=1649856604; x=1649858404; bh=p7TBKMSDdwY4II+qpaeFxUBrJeho9q7bgyu9bsPBT4A=; h=Content-Type:Message-ID:Date:From:Subject:To:X-ESPOL:From:Date:To: Cc:Message-ID:Subject:Reply-To; b=cWcEo5cx3s1y6FCwTzZh8aTLU2qKvBtacuVnaRautjFEPUSuafasztMYfx9HE0ZVu PrE3DsD4yder0NlSR//mNZmMJdzmQ+RyxbaJtDuWyaYonDT8npV+YN0SAz4u8ySwhe 5Uw4yPVKFf99/OrIhAxpmdA4YLCvIux6sswkjgDM= Received: from w6.inbox.lv (w6 [127.0.0.1]) by shark2-in.inbox.lv (Postfix) with ESMTP id C1074C01B7; Wed, 13 Apr 2022 16:30:04 +0300 (EEST) MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-HTTP-USER-AGENT: Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0 Message-ID: <1649856604.6256d05cbea90@mail.inbox.lv> Date: Wed, 13 Apr 2022 16:30:04 +0300 From: "Martins Ozolins" User-Agent: Inbox.lv Webmail X-ESPOL: EY2EOmVk+XROuN62Ippr4/3twsrRIlcivSD4x7046XJZqs+/xNMJFnPmZYmIHxzADBGgkN+hCBs5lcaSG15OAyTRnQ== Received-SPF: pass client-ip=194.152.32.82; envelope-from=mo98@inbox.lv; helo=shark2.inbox.lv X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.6 (/) X-Mailman-Approved-At: Wed, 13 Apr 2022 11:31:20 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.0 (--) Hello software maintainers.

While using a script that relies upon the "date" utility to recon= struct 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= =2E 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 depart= ure from mostly free human readable date strings I use in the bash shell:
On a Lenovo x250:

ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1980-04-01"
323384400
ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1981-04-01"
date: invalid date ‘1981-04-01’
ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1982-04-01"
date: invalid date ‘1982-04-01’
ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1983-04-01"
date: invalid date ‘1983-04-01’
ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1984-04-01"
date: invalid date ‘1984-04-01’
ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1984-04-02"
449697600
ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1985-04-01"
481147200

rc  linux-image-unsigned-4.4.0-194-generic 4.4.0-194.226+8.0trisquel3&= nbsp;           &nbs= p;        amd64    &= nbsp;   Linux-libre kernel image for version 4.4.0
-------------------
I also observed the same results as described above on all other systems an= d 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
  From unknown Mon Aug 18 17:58:20 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: "Martins Ozolins" Subject: bug#54916: closed (Re: bug#54916: 4 invalid dates reported by "date") Message-ID: References: <8f847fc7-f985-a0b9-43b5-f96982dea15d@cs.ucla.edu> <1649856604.6256d05cbea90@mail.inbox.lv> X-Gnu-PR-Message: they-closed 54916 X-Gnu-PR-Package: coreutils Reply-To: 54916@debbugs.gnu.org Date: Wed, 13 Apr 2022 19:20:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1649877602-17391-1" This is a multi-part message in MIME format... ------------=_1649877602-17391-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #54916: 4 invalid dates reported by "date" which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 54916@debbugs.gnu.org. --=20 54916: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D54916 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1649877602-17391-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 54916-done) by debbugs.gnu.org; 13 Apr 2022 19:19:48 +0000 Received: from localhost ([127.0.0.1]:54055 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neiWq-0004W1-7u for submit@debbugs.gnu.org; Wed, 13 Apr 2022 15:19:48 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:37252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neiWn-0004Vo-IH for 54916-done@debbugs.gnu.org; Wed, 13 Apr 2022 15:19:46 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8443C1600ED; Wed, 13 Apr 2022 12:19:39 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id SIxMXi5ReN4S; Wed, 13 Apr 2022 12:19:38 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E57B31600F1; Wed, 13 Apr 2022 12:19:38 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id eXcnhbrM3C5p; Wed, 13 Apr 2022 12:19:38 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C03891600ED; Wed, 13 Apr 2022 12:19:38 -0700 (PDT) Message-ID: <8f847fc7-f985-a0b9-43b5-f96982dea15d@cs.ucla.edu> Date: Wed, 13 Apr 2022 12:19:38 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US To: Martins Ozolins References: <1649856604.6256d05cbea90@mail.inbox.lv> From: Paul Eggert Organization: UCLA Computer Science Department Subject: Re: bug#54916: 4 invalid dates reported by "date" In-Reply-To: <1649856604.6256d05cbea90@mail.inbox.lv> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 54916-done Cc: 54916-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) On 4/13/22 06:30, Martins Ozolins via GNU coreutils Bug Reports wrote: > ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1981-04-01" > date: invalid date =E2=80=981981-04-01=E2=80=99 This is because your invocation is equivalent to: date +%s --date=3D"1981-04-01 00:00:00" and there was no midnight at that date in Latvia. ------------=_1649877602-17391-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 13 Apr 2022 15:31:22 +0000 Received: from localhost ([127.0.0.1]:53674 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neexm-0006WL-A5 for submit@debbugs.gnu.org; Wed, 13 Apr 2022 11:31:22 -0400 Received: from lists.gnu.org ([209.51.188.17]:41404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ned4V-0002S7-Gy for submit@debbugs.gnu.org; Wed, 13 Apr 2022 09:30:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ned4V-0003Pf-AX for bug-coreutils@gnu.org; Wed, 13 Apr 2022 09:30:11 -0400 Received: from shark2.inbox.lv ([194.152.32.82]:51438) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ned4S-0001U3-Ma for bug-coreutils@gnu.org; Wed, 13 Apr 2022 09:30:10 -0400 Received: by shark2.inbox.lv (Postfix, from userid 2004) id E0E66C01C1; Wed, 13 Apr 2022 16:30:04 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=inbox.lv; s=p20220324; t=1649856604; x=1649858404; bh=p7TBKMSDdwY4II+qpaeFxUBrJeho9q7bgyu9bsPBT4A=; h=Content-Type:Message-ID:Date:From:Subject:To:X-ESPOL:From:Date:To: Cc:Message-ID:Subject:Reply-To; b=cWcEo5cx3s1y6FCwTzZh8aTLU2qKvBtacuVnaRautjFEPUSuafasztMYfx9HE0ZVu PrE3DsD4yder0NlSR//mNZmMJdzmQ+RyxbaJtDuWyaYonDT8npV+YN0SAz4u8ySwhe 5Uw4yPVKFf99/OrIhAxpmdA4YLCvIux6sswkjgDM= Received: from w6.inbox.lv (w6 [127.0.0.1]) by shark2-in.inbox.lv (Postfix) with ESMTP id C1074C01B7; Wed, 13 Apr 2022 16:30:04 +0300 (EEST) MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-HTTP-USER-AGENT: Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0 Message-ID: <1649856604.6256d05cbea90@mail.inbox.lv> Date: Wed, 13 Apr 2022 16:30:04 +0300 From: "Martins Ozolins" Subject: 4 invalid dates reported by "date" To: bug-coreutils@gnu.org User-Agent: Inbox.lv Webmail X-ESPOL: EY2EOmVk+XROuN62Ippr4/3twsrRIlcivSD4x7046XJZqs+/xNMJFnPmZYmIHxzADBGgkN+hCBs5lcaSG15OAyTRnQ== Received-SPF: pass client-ip=194.152.32.82; envelope-from=mo98@inbox.lv; helo=shark2.inbox.lv X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 13 Apr 2022 11:31:20 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.0 (--) Hello software maintainers.

While using a script that relies upon the "date" utility to recon= struct 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= =2E 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 depart= ure from mostly free human readable date strings I use in the bash shell:
On a Lenovo x250:

ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1980-04-01"
323384400
ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1981-04-01"
date: invalid date ‘1981-04-01’
ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1982-04-01"
date: invalid date ‘1982-04-01’
ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1983-04-01"
date: invalid date ‘1983-04-01’
ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1984-04-01"
date: invalid date ‘1984-04-01’
ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1984-04-02"
449697600
ozoma@ozoma-ThinkPad-X250:$ date +%s --date=3D"1985-04-01"
481147200

rc  linux-image-unsigned-4.4.0-194-generic 4.4.0-194.226+8.0trisquel3&= nbsp;           &nbs= p;        amd64    &= nbsp;   Linux-libre kernel image for version 4.4.0
-------------------
I also observed the same results as described above on all other systems an= d 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
  ------------=_1649877602-17391-1--