GNU logs - #26902, boring messages


Message sent to bug-coreutils@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#26902: good invalid dates vs. bad invalid dates
Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-coreutils@HIDDEN
Resent-Date: Fri, 12 May 2017 22:42:01 +0000
Resent-Message-ID: <handler.26902.B.149462886921830 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 26902
X-GNU-PR-Package: coreutils
X-GNU-PR-Keywords: 
To: 26902 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-coreutils@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.149462886921830
          (code B ref -1); Fri, 12 May 2017 22:42:01 +0000
Received: (at submit) by debbugs.gnu.org; 12 May 2017 22:41:09 +0000
Received: from localhost ([127.0.0.1]:41443 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d9JFE-0005g2-Sr
	for submit <at> debbugs.gnu.org; Fri, 12 May 2017 18:41:09 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59887)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1d9JFC-0005fm-QW
 for submit <at> debbugs.gnu.org; Fri, 12 May 2017 18:41:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1d9JF6-0004gw-Pl
 for submit <at> debbugs.gnu.org; Fri, 12 May 2017 18:41:01 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: **
X-Spam-Status: No, score=2.4 required=5.0 tests=BAYES_50,DATE_IN_PAST_03_06,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:55128)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jidanni@HIDDEN>) id 1d9JF6-0004gK-Hu
 for submit <at> debbugs.gnu.org; Fri, 12 May 2017 18:41:00 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:50851)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1d9JF5-0002Jk-8L
 for bug-coreutils@HIDDEN; Fri, 12 May 2017 18:41:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1d9JF1-0004Xq-9a
 for bug-coreutils@HIDDEN; Fri, 12 May 2017 18:40:59 -0400
Received: from homie.mail.dreamhost.com ([208.97.132.208]:51944
 helo=homiemail-a7.g.dreamhost.com)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <jidanni@HIDDEN>) id 1d9JF1-0004Vp-01
 for bug-coreutils@HIDDEN; Fri, 12 May 2017 18:40:55 -0400
Received: from homiemail-a7.g.dreamhost.com (localhost [127.0.0.1])
 by homiemail-a7.g.dreamhost.com (Postfix) with ESMTP id 0027525C06A
 for <bug-coreutils@HIDDEN>; Fri, 12 May 2017 15:40:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to
 :subject:date:message-id:mime-version:content-type:
 content-transfer-encoding; s=jidanni.org; bh=YnwwEnkgJm8sjfqMdhN
 VQUYvRW4=; b=hcL7zYhMtuxfvYTCY9104NuKR9mbzTPKTZcEPqFn6Sar+yoIdQQ
 BJXhbw/90L/sIe3csLSpAF/SCZzrcHvbcR/bx8BYAjlNXWCiD5h1y98ePd+tTP0i
 YgbZHkhVyYj2mPuSxDkMzjpavytYiAa/ELGidaPfUJrsIUfJRuwc1+FI=
Received: from jidanni.org (122-118-149-227.dynamic-ip.hinet.net
 [122.118.149.227])
 (using TLSv1 with cipher AES256-SHA (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jidanni@HIDDEN)
 by homiemail-a7.g.dreamhost.com (Postfix) with ESMTPSA id 77EEC25C062
 for <bug-coreutils@HIDDEN>; Fri, 12 May 2017 15:40:51 -0700 (PDT)
From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Date: Sat, 13 May 2017 01:26:49 +0800
Message-ID: <87o9uyhtpi.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.9 (---)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.9 (---)

Can you please don't say "invalid date" for everything invalid.

$ date -d @1494439601675485
date: invalid date =E2=80=98@1494439601675485=E2=80=99
$ date -d 1494439601675485sec
date: invalid date =E2=80=981494439601675485sec=E2=80=99
$ date -d 1494439601675485seconds
date: invalid date =E2=80=981494439601675485seconds=E2=80=99
$ date -d @1494439601675485
date: invalid date =E2=80=98@1494439601675485=E2=80=99
$ date -d @1494439601675
date: invalid date =E2=80=98@1494439601675=E2=80=99
$ date -d @1
=E5=9B=9B  1=E6=9C=88  1 08:00:01 CST 1970
$ date -d @149443960167
date: invalid date =E2=80=98@149443960167=E2=80=99
$ date -d @14944396016
date: invalid date =E2=80=98@14944396016=E2=80=99
$ date -d @1494439601
=E5=9B=9B  5=E6=9C=88 11 02:06:41 CST 2017
$ date -d @zzzzzz
date: invalid date =E2=80=98@zzzzzz=E2=80=99

On (info "(coreutils) Seconds since the Epoch") it says

      Traditional Unix systems count seconds with 32-bit two=E2=80=99s-co=
mplement
   integers and can represent times from 1901-12-13 20:45:52 through
   2038-01-19 03:14:07 UTC.  More modern systems use 64-bit counts of
   seconds with nanosecond subcounts, and can represent all the times in

Please catch the cases where the user merely has entered too many digits
for the computer in question, and say
date: too far into the future.
or
date: too far into the future for current computer.
or
date: invalid date: too far into the future for current computer.

Please don't just give the same message that you give if the user hasn't
even entered one digit.




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Subject: bug#26902: Acknowledgement (good invalid dates vs. bad invalid dates)
Message-ID: <handler.26902.B.149462886921830.ack <at> debbugs.gnu.org>
References: <87o9uyhtpi.fsf@HIDDEN>
X-Gnu-PR-Message: ack 26902
X-Gnu-PR-Package: coreutils
Reply-To: 26902 <at> debbugs.gnu.org
Date: Fri, 12 May 2017 22:42:03 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-coreutils@HIDDEN

If you wish to submit further information on this problem, please
send it to 26902 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
26902: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D26902
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 29 Oct 2018 03:15:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 28 23:15:26 2018
Received: from localhost ([127.0.0.1]:49725 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gGy1W-0005kE-FV
	for submit <at> debbugs.gnu.org; Sun, 28 Oct 2018 23:15:26 -0400
Received: from mail-io1-f49.google.com ([209.85.166.49]:38103)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <assafgordon@HIDDEN>) id 1gGy1V-0005fF-Ja
 for control <at> debbugs.gnu.org; Sun, 28 Oct 2018 23:15:25 -0400
Received: by mail-io1-f49.google.com with SMTP id q18-v6so4060286iod.5
 for <control <at> debbugs.gnu.org>; Sun, 28 Oct 2018 20:15:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=to:from:message-id:date:user-agent:mime-version:content-language
 :content-transfer-encoding;
 bh=1xJJfW5YK4fEwi493oZq+dT2Y/MkQPVd4ztT1u+tljk=;
 b=QEkdVmu3d0Adwc6YYuMzK6VZlXUNYygSk/+aGmxYde9nXJ2VZJrfkIWaugWDmZqIHB
 3gSHZvvm2Z5npV/lHNsTb1yMuT805OqZxV2dCCpbrUSBJNWBrr/2FL0oIUzo/89K5tKk
 BKz6qUGNHyw3NOKKUGTV8CaTtH3jjEkogVNvvKzW0VvLPVWP8zWb6kK5IK7RU4y7pBN5
 ClbPByKd5lcSVAr2zR760NjnGEFzTPtEaTiVwYlwwXWWxF6R8fi8w9x2mV5YvDw4ckTK
 7Ur64bzq8PTJeCjly27FCvuR1VhctYLVuuB8S3MhfEmDO+3RKHZDj2G8VADls0WVbO/i
 88cg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version
 :content-language:content-transfer-encoding;
 bh=1xJJfW5YK4fEwi493oZq+dT2Y/MkQPVd4ztT1u+tljk=;
 b=tfTDnhFSNG9sY5Xk6iYox07ad6idKrS4TRggFDbx5wZP1ueWtl8Lb187DvVXvPlA9g
 9xLA5Jz25VoteFmBfwYmiFXW5ANuxBTs2sOCX/biwnhQv0yw4S7Xm2bQET/zSrD48Xfc
 K4exJJgtfdC5wLtNa5ly6F8q9BgLPZVyhuajM9bByvsWwUPGoebcyloR2c5v0Jcs0PnX
 VM9678VMRp7LPfsg08pOFRWBulNWUtGcb3FhiFw5QlKAXQUSk6i+PCE8j4riIHsIuE7A
 DSl67Ff2ZABvxnH+XxVk7+DMi+pUzzmbTnv2TqewmHaE//gRS7Hm3BPKjtVzeq2+25Xy
 cM/g==
X-Gm-Message-State: AGRZ1gIATM++0N0MHvbbtkD9i+0pJyEmPPJyIuK/TsSAJkcSalTTxFIW
 zM2u+vTzv8wxNcqAJyZbjVyT3MbJPRg=
X-Google-Smtp-Source: AJdET5d4b4QGjJxz4Ay3bIKlXJEZTh/mw9OQCDxd8LF6h/gL60zv8sDOIFmhZWUp7Gihs5gKi7DgAg==
X-Received: by 2002:a6b:f30c:: with SMTP id
 m12-v6mr7433395ioh.253.1540782919633; 
 Sun, 28 Oct 2018 20:15:19 -0700 (PDT)
Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38])
 by smtp.googlemail.com with ESMTPSA id
 k15-v6sm5553991itk.8.2018.10.28.20.15.18
 for <control <at> debbugs.gnu.org>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 28 Oct 2018 20:15:18 -0700 (PDT)
To: control <at> debbugs.gnu.org
From: Assaf Gordon <assafgordon@HIDDEN>
Message-ID: <c6beba42-1310-708f-ab9e-97263b44b809@HIDDEN>
Date: Sun, 28 Oct 2018 21:15:17 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.2.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  severity 26902 wishlist retitle 26902 date: improve error
 messages for invalid dates [...] 
 Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
 trust [209.85.166.49 listed in list.dnswl.org]
 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
 (assafgordon[at]gmail.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.166.49 listed in wl.mailspike.net]
 1.8 MISSING_SUBJECT        Missing Subject: header
 0.2 NO_SUBJECT             Extra score for no subject
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

severity 26902 wishlist
retitle 26902 date: improve error messages for invalid dates




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 29 Oct 2018 03:15:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 28 23:15:26 2018
Received: from localhost ([127.0.0.1]:49725 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gGy1W-0005kE-FV
	for submit <at> debbugs.gnu.org; Sun, 28 Oct 2018 23:15:26 -0400
Received: from mail-io1-f49.google.com ([209.85.166.49]:38103)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <assafgordon@HIDDEN>) id 1gGy1V-0005fF-Ja
 for control <at> debbugs.gnu.org; Sun, 28 Oct 2018 23:15:25 -0400
Received: by mail-io1-f49.google.com with SMTP id q18-v6so4060286iod.5
 for <control <at> debbugs.gnu.org>; Sun, 28 Oct 2018 20:15:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=to:from:message-id:date:user-agent:mime-version:content-language
 :content-transfer-encoding;
 bh=1xJJfW5YK4fEwi493oZq+dT2Y/MkQPVd4ztT1u+tljk=;
 b=QEkdVmu3d0Adwc6YYuMzK6VZlXUNYygSk/+aGmxYde9nXJ2VZJrfkIWaugWDmZqIHB
 3gSHZvvm2Z5npV/lHNsTb1yMuT805OqZxV2dCCpbrUSBJNWBrr/2FL0oIUzo/89K5tKk
 BKz6qUGNHyw3NOKKUGTV8CaTtH3jjEkogVNvvKzW0VvLPVWP8zWb6kK5IK7RU4y7pBN5
 ClbPByKd5lcSVAr2zR760NjnGEFzTPtEaTiVwYlwwXWWxF6R8fi8w9x2mV5YvDw4ckTK
 7Ur64bzq8PTJeCjly27FCvuR1VhctYLVuuB8S3MhfEmDO+3RKHZDj2G8VADls0WVbO/i
 88cg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version
 :content-language:content-transfer-encoding;
 bh=1xJJfW5YK4fEwi493oZq+dT2Y/MkQPVd4ztT1u+tljk=;
 b=tfTDnhFSNG9sY5Xk6iYox07ad6idKrS4TRggFDbx5wZP1ueWtl8Lb187DvVXvPlA9g
 9xLA5Jz25VoteFmBfwYmiFXW5ANuxBTs2sOCX/biwnhQv0yw4S7Xm2bQET/zSrD48Xfc
 K4exJJgtfdC5wLtNa5ly6F8q9BgLPZVyhuajM9bByvsWwUPGoebcyloR2c5v0Jcs0PnX
 VM9678VMRp7LPfsg08pOFRWBulNWUtGcb3FhiFw5QlKAXQUSk6i+PCE8j4riIHsIuE7A
 DSl67Ff2ZABvxnH+XxVk7+DMi+pUzzmbTnv2TqewmHaE//gRS7Hm3BPKjtVzeq2+25Xy
 cM/g==
X-Gm-Message-State: AGRZ1gIATM++0N0MHvbbtkD9i+0pJyEmPPJyIuK/TsSAJkcSalTTxFIW
 zM2u+vTzv8wxNcqAJyZbjVyT3MbJPRg=
X-Google-Smtp-Source: AJdET5d4b4QGjJxz4Ay3bIKlXJEZTh/mw9OQCDxd8LF6h/gL60zv8sDOIFmhZWUp7Gihs5gKi7DgAg==
X-Received: by 2002:a6b:f30c:: with SMTP id
 m12-v6mr7433395ioh.253.1540782919633; 
 Sun, 28 Oct 2018 20:15:19 -0700 (PDT)
Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38])
 by smtp.googlemail.com with ESMTPSA id
 k15-v6sm5553991itk.8.2018.10.28.20.15.18
 for <control <at> debbugs.gnu.org>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 28 Oct 2018 20:15:18 -0700 (PDT)
To: control <at> debbugs.gnu.org
From: Assaf Gordon <assafgordon@HIDDEN>
Message-ID: <c6beba42-1310-708f-ab9e-97263b44b809@HIDDEN>
Date: Sun, 28 Oct 2018 21:15:17 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.2.1
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 2.0 (++)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  severity 26902 wishlist retitle 26902 date: improve error
 messages for invalid dates [...] 
 Content analysis details:   (2.0 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at http://www.dnswl.org/, no
 trust [209.85.166.49 listed in list.dnswl.org]
 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
 (assafgordon[at]gmail.com)
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 RCVD_IN_MSPIKE_H2      RBL: Average reputation (+2)
 [209.85.166.49 listed in wl.mailspike.net]
 1.8 MISSING_SUBJECT        Missing Subject: header
 0.2 NO_SUBJECT             Extra score for no subject
X-Debbugs-Envelope-To: control
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.0 (+)

severity 26902 wishlist
retitle 26902 date: improve error messages for invalid dates




Message sent to bug-coreutils@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#26902: good invalid dates vs. bad invalid dates
Resent-From: Assaf Gordon <assafgordon@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-coreutils@HIDDEN
Resent-Date: Mon, 31 Dec 2018 05:23:01 +0000
Resent-Message-ID: <handler.26902.B26902.154623373512059 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 26902
X-GNU-PR-Package: coreutils
X-GNU-PR-Keywords: 
To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>, 26902 <at> debbugs.gnu.org
Received: via spool by 26902-submit <at> debbugs.gnu.org id=B26902.154623373512059
          (code B ref 26902); Mon, 31 Dec 2018 05:23:01 +0000
Received: (at 26902) by debbugs.gnu.org; 31 Dec 2018 05:22:15 +0000
Received: from localhost ([127.0.0.1]:42763 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gdq1n-00038R-2z
	for submit <at> debbugs.gnu.org; Mon, 31 Dec 2018 00:22:15 -0500
Received: from mail-pf1-f174.google.com ([209.85.210.174]:38483)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <assafgordon@HIDDEN>) id 1gdq1l-00038D-Hs
 for 26902 <at> debbugs.gnu.org; Mon, 31 Dec 2018 00:22:13 -0500
Received: by mail-pf1-f174.google.com with SMTP id q1so12841815pfi.5
 for <26902 <at> debbugs.gnu.org>; Sun, 30 Dec 2018 21:22:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=subject:to:references:from:message-id:date:user-agent:mime-version
 :in-reply-to:content-language:content-transfer-encoding;
 bh=0SXGqQfK4ApKchGgATZUUzN36S1WhImwhpiEjA16RS8=;
 b=YNCOMfO1zxTyCUGKx1dono93oUoDctD1WKYqb9L9KQrKmBckhW86y2QoYo45vnJMzS
 XocDjo5Ao3SA3GYVW7psbkzYxZ2eE05bFS/sGVvfxD8NljW9+YtPKXUZCklqZSOm6Sep
 bFPP2Ix+i5p/Rb3AbHqRlM4qAolKlRx4E73Pp039j5YuxF7hI/O9JFdppBVMePHRqw3s
 EtWzxwhNFVX5CslKETX40uabcLqQLxI/oYuBysyBrIPbbh3qgEuv/9liDtjoS/L9Sgxv
 hwJSxEOOHZdzMS9v8/jkNAd4Q6RTG8ityHRN+KJ9wygskSMte3zkj/WxQp9cNU/JK5Rv
 BBPg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=0SXGqQfK4ApKchGgATZUUzN36S1WhImwhpiEjA16RS8=;
 b=iWdjMr2DeHWxy692fcO2vb3hMcGlERNECySf5MKdtP7zhgCJj0Yjdw0OzcQUPa6Nsj
 KrYIQkAUAo8ecLxJtQleapwtnGGUzTHiuLnxiSWohteXR7sUIxJ9qtqy/zRnSLm5tCzt
 Qo9vI4sB+5z5DIQ7FlqFFOXZ6ZVXBIPpeqBJ282T9o6KhQLT5DF9aGK1u3I6Rew9aomL
 2FxWDJ0GXX08rslqZhYuMH+n3k5HwM9zwlT5wUoAj9adaXfPZl2bTzQh+ANOmEv3t1xp
 jOVP3ABTkjNbfBHQb2r+PaSRMP4d+04o/P+kV5kB2uq08TvW0HA9RsRlf1BIobnEUrtK
 Y7Uw==
X-Gm-Message-State: AA+aEWY1MHuRQCrFaEZko4sBds1R8oymIWwyTlxoJFSsL9qD0LizanTU
 BwZkO5+2QjbHFKoEF3SFoNq6n86u
X-Google-Smtp-Source: AFSGD/Uhg6hje5izqY2XNeudkokINzW1lU9r5aYfF6xSuPcLIQXWvU+7jQBvZUye3++z0leSPKqz7A==
X-Received: by 2002:a62:6799:: with SMTP id t25mr36844768pfj.139.1546233727159; 
 Sun, 30 Dec 2018 21:22:07 -0800 (PST)
Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38])
 by smtp.googlemail.com with ESMTPSA id
 z9sm135261914pfd.99.2018.12.30.21.22.05
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 30 Dec 2018 21:22:05 -0800 (PST)
References: <87o9uyhtpi.fsf@HIDDEN>
From: Assaf Gordon <assafgordon@HIDDEN>
Message-ID: <12eb4bba-30cf-dada-12d2-aa69bce31a3c@HIDDEN>
Date: Sun, 30 Dec 2018 22:22:04 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.3.0
MIME-Version: 1.0
In-Reply-To: <87o9uyhtpi.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

On 2017-05-12 11:26 a.m., 積丹尼 Dan Jacobson wrote:
> Can you please don't say "invalid date" for everything invalid.
> 
> $ date -d @1494439601675485
> date: invalid date ‘@1494439601675485’
> $ date -d 1494439601675485sec
> date: invalid date ‘1494439601675485sec’
> $ date -d 1494439601675485seconds
> date: invalid date ‘1494439601675485seconds’
> $ date -d @1494439601675485
> date: invalid date ‘@1494439601675485’
> $ date -d @1494439601675
> date: invalid date ‘@1494439601675’
> $ date -d @1
> 四  1月  1 08:00:01 CST 1970
> $ date -d @149443960167
> date: invalid date ‘@149443960167’
> $ date -d @14944396016
> date: invalid date ‘@14944396016’
> $ date -d @1494439601
> 四  5月 11 02:06:41 CST 2017
> $ date -d @zzzzzz
> date: invalid date ‘@zzzzzz’
> 
> On (info "(coreutils) Seconds since the Epoch") it says
> 
>        Traditional Unix systems count seconds with 32-bit two’s-complement
>     integers and can represent times from 1901-12-13 20:45:52 through
>     2038-01-19 03:14:07 UTC.  More modern systems use 64-bit counts of
>     seconds with nanosecond subcounts, and can represent all the times in
> 
> Please catch the cases where the user merely has entered too many digits
> for the computer in question, and say
> date: too far into the future.
> or
> date: too far into the future for current computer.
> or
> date: invalid date: too far into the future for current computer.
> 
> Please don't just give the same message that you give if the user hasn't
> even entered one digit.

Please note that the errors above (with "@") are specific to 32-bit system,
where "time_t" is a signed 32 bit integer (and thus limited to
2147483647, the infamous "Year 2038" problem).

On a 64-bit system, the range is larger (allowing dates into the far
future), and too-far values are reported:

   $ date -d @2147483647
   Mon Jan 18 20:14:07 MST 2038
   $ date -d @2147483648
   Mon Jan 18 20:14:08 MST 2038
   $ date -d @214748364800
   Sat Feb  8 04:33:20 MST 8775
   $ date -d @21474836480000
   Sat Jun 22 21:33:20 MDT 682480
   $ date -d @2147483648000000
   Wed Oct  8 12:33:20 MST 68053017
   $ date -d @214748364800000000
   date: time ‘214748364800000000’ is out of range


I'm thus inclined to close this as "wontfix", but others opinions
are welcomed.


regards,
  - assaf


P.S.
If anyone is interested in trying their hands at a patch:

The "invalid date" error originates from the
bison-generated parser indicating a parsing problem, not directly
an "integer too large" problem (a call to YYABORT in gnulib's 
"parse-datetime.y).

A good place to start is the "seconds" parsing rule here:

   https://git.sv.gnu.org/cgit/gnulib.git/tree/lib/parse-datetime.y#n968

Both "signed_seconds" and "unsigned_seconds" rules have the following
condition:

     if (time_overflow ($1.value)) YYABORT;

Instead of "YYABORT" another error mechanism could be created.




Message sent to bug-coreutils@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#26902: good invalid dates vs. bad invalid dates
In-Reply-To: <87o9uyhtpi.fsf@HIDDEN>
Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-coreutils@HIDDEN
Resent-Date: Mon, 31 Dec 2018 06:26:01 +0000
Resent-Message-ID: <handler.26902.B26902.154623751326111 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 26902
X-GNU-PR-Package: coreutils
X-GNU-PR-Keywords: 
To: Assaf Gordon <assafgordon@HIDDEN>
Cc: 26902 <at> debbugs.gnu.org
Received: via spool by 26902-submit <at> debbugs.gnu.org id=B26902.154623751326111
          (code B ref 26902); Mon, 31 Dec 2018 06:26:01 +0000
Received: (at 26902) by debbugs.gnu.org; 31 Dec 2018 06:25:13 +0000
Received: from localhost ([127.0.0.1]:42789 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gdr0j-0006n5-Gx
	for submit <at> debbugs.gnu.org; Mon, 31 Dec 2018 01:25:13 -0500
Received: from ladybird.maple.relay.mailchannels.net ([23.83.214.98]:18808)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1gdr0g-0006mw-VD
 for 26902 <at> debbugs.gnu.org; Mon, 31 Dec 2018 01:25:12 -0500
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 3E98C5C3D5C;
 Mon, 31 Dec 2018 06:25:09 +0000 (UTC)
Received: from pdx1-sub0-mail-a40.g.dreamhost.com (unknown [100.96.35.77])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 5DABE5C3D63;
 Mon, 31 Dec 2018 06:25:07 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jidanni@HIDDEN
Received: from pdx1-sub0-mail-a40.g.dreamhost.com (pop.dreamhost.com
 [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)
 by 0.0.0.0:2500 (trex/5.16.2); Mon, 31 Dec 2018 06:25:09 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Ski-Reign: 7b1d31496e3404fa_1546237507496_2301951619
X-MC-Loop-Signature: 1546237507495:1645866815
X-MC-Ingress-Time: 1546237507495
Received: from pdx1-sub0-mail-a40.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a40.g.dreamhost.com (Postfix) with ESMTP id C2A7381C75;
 Sun, 30 Dec 2018 22:25:06 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to:cc
 :subject:references:date:message-id:mime-version:content-type;
 s=jidanni.org; bh=SPdarUHdxxdTASeSdz/F1lpxcPk=; b=J+tFffulSW1fX
 kLN+kOTZa9h+7x75pOlX9jMRVv1Ns4LXK2kz+mk8dGhTS/Hy4CXQpYmaigsGrVoG
 SHmYyWPBWs0FTBIknpgiKXJA5iB5fivtWifavtjsS7cKKJvlf3eFylmqvFEnX/nn
 xnzQPwGx6oNS+nOEaWBJyyZVffinmk=
Received: from jidanni.org (39-9-13-21.adsl.fetnet.net [39.9.13.21])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jidanni@HIDDEN)
 by pdx1-sub0-mail-a40.g.dreamhost.com (Postfix) with ESMTPSA id 194598041C;
 Sun, 30 Dec 2018 22:25:06 -0800 (PST)
X-DH-BACKEND: pdx1-sub0-mail-a40
From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
References: <87o9uyhtpi.fsf@HIDDEN>
 <12eb4bba-30cf-dada-12d2-aa69bce31a3c@HIDDEN>
Date: Mon, 31 Dec 2018 14:24:57 +0800
Message-ID: <87imzaxlfq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledruddugdeliecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufhffkfggtgesthdtredttddtjeenucfhrhhomhepnjjnnjcuffgrnhculfgrtghosghsohhnuceojhhiuggrnhhnihesjhhiuggrnhhnihdrohhrgheqnecukfhppeefledrledrudefrddvudenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepjhhiuggrnhhnihdrohhrghdpihhnvghtpeefledrledrudefrddvuddprhgvthhurhhnqdhprghthheppeeruhhtfhdqkeerueerheeimhfphefnihehhegsveekreepucffrghnucflrggtohgsshhonhcuoehjihgurghnnhhisehjihgurghnnhhirdhorhhgqedpmhgrihhlfhhrohhmpehjihgurghnnhhisehjihgurghnnhhirdhorhhgpdhnrhgtphhtthhopedvieeltddvseguvggssghughhsrdhgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd
X-Spam-Score: 0.1 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.9 (/)

Maybe it should try to pass on to the user at least an error code:
Invalid date: error code 0754,
or even better, an mention of what error it hit.





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.