GNU logs - #18328, boring messages


Message sent to bug-coreutils@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18328: can't say date -d '8pm -0500' though other combos work
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, 25 Aug 2014 16:02:01 +0000
Resent-Message-ID: <handler.18328.B.14089825184286 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 18328
X-GNU-PR-Package: coreutils
X-GNU-PR-Keywords: 
To: 18328 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-coreutils@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.14089825184286
          (code B ref -1); Mon, 25 Aug 2014 16:02:01 +0000
Received: (at submit) by debbugs.gnu.org; 25 Aug 2014 16:01:58 +0000
Received: from localhost ([127.0.0.1]:51894 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XLwiQ-00016z-2w
	for submit <at> debbugs.gnu.org; Mon, 25 Aug 2014 12:01:57 -0400
Received: from eggs.gnu.org ([208.118.235.92]:59274)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <jidanni@HIDDEN>) id 1XLwiJ-00016U-TX
 for submit <at> debbugs.gnu.org; Mon, 25 Aug 2014 12:01:52 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1XLwi6-0003RJ-K0
 for submit <at> debbugs.gnu.org; Mon, 25 Aug 2014 12:01:42 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_05,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:48828)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1XLwi6-0003RD-HD
 for submit <at> debbugs.gnu.org; Mon, 25 Aug 2014 12:01:34 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60931)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1XLwhz-0006te-Lh
 for bug-coreutils@HIDDEN; Mon, 25 Aug 2014 12:01:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1XLwhs-0003NY-MG
 for bug-coreutils@HIDDEN; Mon, 25 Aug 2014 12:01:27 -0400
Received: from homie.mail.dreamhost.com ([208.97.132.208]:49202
 helo=homiemail-a8.g.dreamhost.com)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <jidanni@HIDDEN>) id 1XLwhs-0003MW-Gt
 for bug-coreutils@HIDDEN; Mon, 25 Aug 2014 12:01:20 -0400
Received: from homiemail-a8.g.dreamhost.com (localhost [127.0.0.1])
 by homiemail-a8.g.dreamhost.com (Postfix) with ESMTP id AA8F1D22088
 for <bug-coreutils@HIDDEN>; Mon, 25 Aug 2014 09:01:18 -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=qdXurzIiAnbEZzT4d4M
 rJYVHdfs=; b=ZlKEDKqxfoGCiS86Kt8+q4VtDT9HRxJtQWKxk2XEd335yxwUWLd
 JGsA+omLammFncJKm7YTGqxssD6XtE57gAYHsFx90qv7ZFcb+adcOkvXEhbosRwc
 8XUnyUEPDC+rIbJe7MzATlIRgihDfbBIy/E/6Ge9BKrvY5jAF/kcy+Pw=
Received: from jidanni.org (111-246-102-246.dynamic.hinet.net
 [111.246.102.246])
 (using TLSv1 with cipher AES128-SHA (128/128 bits))
 (No client certificate requested)
 (Authenticated sender: jidanni@HIDDEN)
 by homiemail-a8.g.dreamhost.com (Postfix) with ESMTPSA id 5AFC4D22082
 for <bug-coreutils@HIDDEN>; Mon, 25 Aug 2014 09:01:18 -0700 (PDT)
From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
Date: Tue, 26 Aug 2014 00:01:16 +0800
Message-ID: <87ppfo36er.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.2.x-3.x (no
 timestamps) [generic]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://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: <http://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: -5.0 (-----)

$ date -d '8pm -0500'
date: invalid date =E2=80=988pm -0500=E2=80=99 <--why can't this combo wo=
rk?
$ date -d '20:00 -0500'
=E4=BA=8C  8=E6=9C=88 26 09:00:00 CST 2014
$ date -d 'sun 8pm'
=E6=97=A5  8=E6=9C=88 31 20:00:00 CST 2014
$ date -d '8pm'
=E4=B8=80  8=E6=9C=88 25 20:00:00 CST 2014




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.503 (Entity 5.503)
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#18328: Acknowledgement (can't say date -d '8pm -0500' though
 other combos work)
Message-ID: <handler.18328.B.14089825184286.ack <at> debbugs.gnu.org>
References: <87ppfo36er.fsf@HIDDEN>
X-Gnu-PR-Message: ack 18328
X-Gnu-PR-Package: coreutils
Reply-To: 18328 <at> debbugs.gnu.org
Date: Mon, 25 Aug 2014 16:02:02 +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 18328 <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
18328: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D18328
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-coreutils@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18328: can't say date -d '8pm -0500' though other combos work
Resent-From: Assaf Gordon <assafgordon@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-coreutils@HIDDEN
Resent-Date: Sat, 20 Oct 2018 04:26:02 +0000
Resent-Message-ID: <handler.18328.B18328.154000951211855 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 18328
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>, 18328 <at> debbugs.gnu.org
Received: via spool by 18328-submit <at> debbugs.gnu.org id=B18328.154000951211855
          (code B ref 18328); Sat, 20 Oct 2018 04:26:02 +0000
Received: (at 18328) by debbugs.gnu.org; 20 Oct 2018 04:25:12 +0000
Received: from localhost ([127.0.0.1]:60173 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gDip6-000354-K6
	for submit <at> debbugs.gnu.org; Sat, 20 Oct 2018 00:25:12 -0400
Received: from mail-pl1-f181.google.com ([209.85.214.181]:41287)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <assafgordon@HIDDEN>)
 id 1gDip4-00034k-ER; Sat, 20 Oct 2018 00:25:10 -0400
Received: by mail-pl1-f181.google.com with SMTP id p5-v6so1772218plq.8;
 Fri, 19 Oct 2018 21:25:10 -0700 (PDT)
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=RWs7K0jLeE2LOJnTqwfe3ComoQfxwOo+AeRg966eW9c=;
 b=OFy5sH78wMdt5lDH77biehinFLdFxt+gurZwR6Kc8HkKICMIcqnLTl7OnG8WY7kYWi
 CklRj00/NWO8cz8s7Il9e9TmRuavgP+QjRWqO//giST1KFS2n9qdw0cjrJlB+f6n7mmQ
 VgTfK8bHh83B9LaV8JJwkaf5KOuXtAGBX0ij4RYQih8/O3wzH33vWIqNnjadBEDsnTpJ
 4bPJMznIfp5a1huS4HQFD3o2G2Wew5vMqP5z5/Ifun9qUOGgw6lUx/awyfzoWJNCAxhZ
 8hjP56IVo97fGREbsHSCzh3GFVHykC4j0J2FxUYQ77+0FnGZQ4Cgsd78H8hzt9XMRqJ9
 nQKA==
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=RWs7K0jLeE2LOJnTqwfe3ComoQfxwOo+AeRg966eW9c=;
 b=hJm91wvHi++plC6epKcPejWNmG8zuHbMrdYeZzOFUwWptnc9AIX2CM4dbdW5DhtAId
 D//PA1PfEx8J7dqXKbs8ZPCvN8xdzzrVBEBBYUnB4T1xHT1RJP/SA/DmVsTs3ONvZ6DE
 fNT14Knuy8hZIjkkIDlEA+QK9s09qNk/YVzb2OCkzGzZ/FJBBe0pZx6gthvqUIAII5pA
 b9+6i4YHSJDZXl0C1+yUeG+NYVW39GmCa5voQf2IzE/xNAWXKBPkLFUpuEoEtcOEi7Ru
 tn3HhWoJacJtyZZAToGxT2hiP9kR6/ISBm8vx+BP6kxh4M91lG1IvtERDHHfnkjXB9WT
 +llA==
X-Gm-Message-State: ABuFfohyJbYjqyu3gl8RdrVpW0Jl8f5eexjCD8oOzah6u0B5XkW/FyEN
 WgBJlOTuIdA3EQqCcRnp3EffAGrGbo0=
X-Google-Smtp-Source: ACcGV60IqJ96xHOUzI4qgG82B27Hbm/JLGyPuJx3rIF4W4JCKOF+hY8+eEeU5RNA08CH85wBiuiHfA==
X-Received: by 2002:a17:902:2b84:: with SMTP id
 l4-v6mr12471171plb.124.1540009503858; 
 Fri, 19 Oct 2018 21:25:03 -0700 (PDT)
Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38])
 by smtp.googlemail.com with ESMTPSA id
 l129-v6sm33959759pfc.155.2018.10.19.21.25.01
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 19 Oct 2018 21:25:02 -0700 (PDT)
References: <87ppfo36er.fsf@HIDDEN>
From: Assaf Gordon <assafgordon@HIDDEN>
Message-ID: <c8968416-98b5-74ba-ffbe-cd49a23b173c@HIDDEN>
Date: Fri, 19 Oct 2018 22:25:00 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <87ppfo36er.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 (-)

tags 18328 confirmed
retitle 18328 date: '8pm -0500' is invalid (am/pm problem)
stop

(triaging old bugs)

Hello,

On 25/08/14 10:01 AM, 積丹尼 Dan Jacobson wrote:
> $ date -d '8pm -0500'
> date: invalid date ‘8pm -0500’ <--why can't this combo work?

This is indeed a bug (specifically in gnulib's date parsing module,
but easier to track here).

It seems the existence of the "am/pm" string causes the parser
to take a slightly different rule, then reject additional relative
values, unless they have a unit, e.g.:

   $ date --debug -d '8pm +5 days'
   date: parsed time part: 08:00:00pm
   date: parsed relative part: +5 day(s)
   [...]

Contrast it with a different (and confusing) rules when there is
no "am/pm", the relative number is always taken as the time zone, e.g.:

   $ date --debug -d '8:00 +5 days'
   date: parsed time part: 08:00:00 UTC+05
   date: parsed relative part: +1 day(s)
   date: input timezone: parsed date/time string (+05)
   [...]

(from https://bugs.gnu.org/17161#31 )

I hope to get to this bug soon.

-assaf




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


Received: (at control) by debbugs.gnu.org; 20 Oct 2018 04:25:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 20 00:25:12 2018
Received: from localhost ([127.0.0.1]:60171 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gDip6-000352-BE
	for submit <at> debbugs.gnu.org; Sat, 20 Oct 2018 00:25:12 -0400
Received: from mail-pl1-f181.google.com ([209.85.214.181]:41287)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <assafgordon@HIDDEN>)
 id 1gDip4-00034k-ER; Sat, 20 Oct 2018 00:25:10 -0400
Received: by mail-pl1-f181.google.com with SMTP id p5-v6so1772218plq.8;
 Fri, 19 Oct 2018 21:25:10 -0700 (PDT)
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=RWs7K0jLeE2LOJnTqwfe3ComoQfxwOo+AeRg966eW9c=;
 b=OFy5sH78wMdt5lDH77biehinFLdFxt+gurZwR6Kc8HkKICMIcqnLTl7OnG8WY7kYWi
 CklRj00/NWO8cz8s7Il9e9TmRuavgP+QjRWqO//giST1KFS2n9qdw0cjrJlB+f6n7mmQ
 VgTfK8bHh83B9LaV8JJwkaf5KOuXtAGBX0ij4RYQih8/O3wzH33vWIqNnjadBEDsnTpJ
 4bPJMznIfp5a1huS4HQFD3o2G2Wew5vMqP5z5/Ifun9qUOGgw6lUx/awyfzoWJNCAxhZ
 8hjP56IVo97fGREbsHSCzh3GFVHykC4j0J2FxUYQ77+0FnGZQ4Cgsd78H8hzt9XMRqJ9
 nQKA==
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=RWs7K0jLeE2LOJnTqwfe3ComoQfxwOo+AeRg966eW9c=;
 b=hJm91wvHi++plC6epKcPejWNmG8zuHbMrdYeZzOFUwWptnc9AIX2CM4dbdW5DhtAId
 D//PA1PfEx8J7dqXKbs8ZPCvN8xdzzrVBEBBYUnB4T1xHT1RJP/SA/DmVsTs3ONvZ6DE
 fNT14Knuy8hZIjkkIDlEA+QK9s09qNk/YVzb2OCkzGzZ/FJBBe0pZx6gthvqUIAII5pA
 b9+6i4YHSJDZXl0C1+yUeG+NYVW39GmCa5voQf2IzE/xNAWXKBPkLFUpuEoEtcOEi7Ru
 tn3HhWoJacJtyZZAToGxT2hiP9kR6/ISBm8vx+BP6kxh4M91lG1IvtERDHHfnkjXB9WT
 +llA==
X-Gm-Message-State: ABuFfohyJbYjqyu3gl8RdrVpW0Jl8f5eexjCD8oOzah6u0B5XkW/FyEN
 WgBJlOTuIdA3EQqCcRnp3EffAGrGbo0=
X-Google-Smtp-Source: ACcGV60IqJ96xHOUzI4qgG82B27Hbm/JLGyPuJx3rIF4W4JCKOF+hY8+eEeU5RNA08CH85wBiuiHfA==
X-Received: by 2002:a17:902:2b84:: with SMTP id
 l4-v6mr12471171plb.124.1540009503858; 
 Fri, 19 Oct 2018 21:25:03 -0700 (PDT)
Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38])
 by smtp.googlemail.com with ESMTPSA id
 l129-v6sm33959759pfc.155.2018.10.19.21.25.01
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 19 Oct 2018 21:25:02 -0700 (PDT)
Subject: Re: bug#18328: can't say date -d '8pm -0500' though other combos work
To: =?UTF-8?B?56mN5Li55bC8IERhbiBKYWNvYnNvbg==?= <jidanni@HIDDEN>,
 18328 <at> debbugs.gnu.org
References: <87ppfo36er.fsf@HIDDEN>
From: Assaf Gordon <assafgordon@HIDDEN>
Message-ID: <c8968416-98b5-74ba-ffbe-cd49a23b173c@HIDDEN>
Date: Fri, 19 Oct 2018 22:25:00 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <87ppfo36er.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-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 (-)

tags 18328 confirmed
retitle 18328 date: '8pm -0500' is invalid (am/pm problem)
stop

(triaging old bugs)

Hello,

On 25/08/14 10:01 AM, 積丹尼 Dan Jacobson wrote:
> $ date -d '8pm -0500'
> date: invalid date ‘8pm -0500’ <--why can't this combo work?

This is indeed a bug (specifically in gnulib's date parsing module,
but easier to track here).

It seems the existence of the "am/pm" string causes the parser
to take a slightly different rule, then reject additional relative
values, unless they have a unit, e.g.:

   $ date --debug -d '8pm +5 days'
   date: parsed time part: 08:00:00pm
   date: parsed relative part: +5 day(s)
   [...]

Contrast it with a different (and confusing) rules when there is
no "am/pm", the relative number is always taken as the time zone, e.g.:

   $ date --debug -d '8:00 +5 days'
   date: parsed time part: 08:00:00 UTC+05
   date: parsed relative part: +1 day(s)
   date: input timezone: parsed date/time string (+05)
   [...]

(from https://bugs.gnu.org/17161#31 )

I hope to get to this bug soon.

-assaf




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


Received: (at control) by debbugs.gnu.org; 20 Oct 2018 04:25:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 20 00:25:12 2018
Received: from localhost ([127.0.0.1]:60171 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gDip6-000352-BE
	for submit <at> debbugs.gnu.org; Sat, 20 Oct 2018 00:25:12 -0400
Received: from mail-pl1-f181.google.com ([209.85.214.181]:41287)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <assafgordon@HIDDEN>)
 id 1gDip4-00034k-ER; Sat, 20 Oct 2018 00:25:10 -0400
Received: by mail-pl1-f181.google.com with SMTP id p5-v6so1772218plq.8;
 Fri, 19 Oct 2018 21:25:10 -0700 (PDT)
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=RWs7K0jLeE2LOJnTqwfe3ComoQfxwOo+AeRg966eW9c=;
 b=OFy5sH78wMdt5lDH77biehinFLdFxt+gurZwR6Kc8HkKICMIcqnLTl7OnG8WY7kYWi
 CklRj00/NWO8cz8s7Il9e9TmRuavgP+QjRWqO//giST1KFS2n9qdw0cjrJlB+f6n7mmQ
 VgTfK8bHh83B9LaV8JJwkaf5KOuXtAGBX0ij4RYQih8/O3wzH33vWIqNnjadBEDsnTpJ
 4bPJMznIfp5a1huS4HQFD3o2G2Wew5vMqP5z5/Ifun9qUOGgw6lUx/awyfzoWJNCAxhZ
 8hjP56IVo97fGREbsHSCzh3GFVHykC4j0J2FxUYQ77+0FnGZQ4Cgsd78H8hzt9XMRqJ9
 nQKA==
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=RWs7K0jLeE2LOJnTqwfe3ComoQfxwOo+AeRg966eW9c=;
 b=hJm91wvHi++plC6epKcPejWNmG8zuHbMrdYeZzOFUwWptnc9AIX2CM4dbdW5DhtAId
 D//PA1PfEx8J7dqXKbs8ZPCvN8xdzzrVBEBBYUnB4T1xHT1RJP/SA/DmVsTs3ONvZ6DE
 fNT14Knuy8hZIjkkIDlEA+QK9s09qNk/YVzb2OCkzGzZ/FJBBe0pZx6gthvqUIAII5pA
 b9+6i4YHSJDZXl0C1+yUeG+NYVW39GmCa5voQf2IzE/xNAWXKBPkLFUpuEoEtcOEi7Ru
 tn3HhWoJacJtyZZAToGxT2hiP9kR6/ISBm8vx+BP6kxh4M91lG1IvtERDHHfnkjXB9WT
 +llA==
X-Gm-Message-State: ABuFfohyJbYjqyu3gl8RdrVpW0Jl8f5eexjCD8oOzah6u0B5XkW/FyEN
 WgBJlOTuIdA3EQqCcRnp3EffAGrGbo0=
X-Google-Smtp-Source: ACcGV60IqJ96xHOUzI4qgG82B27Hbm/JLGyPuJx3rIF4W4JCKOF+hY8+eEeU5RNA08CH85wBiuiHfA==
X-Received: by 2002:a17:902:2b84:: with SMTP id
 l4-v6mr12471171plb.124.1540009503858; 
 Fri, 19 Oct 2018 21:25:03 -0700 (PDT)
Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38])
 by smtp.googlemail.com with ESMTPSA id
 l129-v6sm33959759pfc.155.2018.10.19.21.25.01
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 19 Oct 2018 21:25:02 -0700 (PDT)
Subject: Re: bug#18328: can't say date -d '8pm -0500' though other combos work
To: =?UTF-8?B?56mN5Li55bC8IERhbiBKYWNvYnNvbg==?= <jidanni@HIDDEN>,
 18328 <at> debbugs.gnu.org
References: <87ppfo36er.fsf@HIDDEN>
From: Assaf Gordon <assafgordon@HIDDEN>
Message-ID: <c8968416-98b5-74ba-ffbe-cd49a23b173c@HIDDEN>
Date: Fri, 19 Oct 2018 22:25:00 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
 Thunderbird/52.9.1
MIME-Version: 1.0
In-Reply-To: <87ppfo36er.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-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 (-)

tags 18328 confirmed
retitle 18328 date: '8pm -0500' is invalid (am/pm problem)
stop

(triaging old bugs)

Hello,

On 25/08/14 10:01 AM, 積丹尼 Dan Jacobson wrote:
> $ date -d '8pm -0500'
> date: invalid date ‘8pm -0500’ <--why can't this combo work?

This is indeed a bug (specifically in gnulib's date parsing module,
but easier to track here).

It seems the existence of the "am/pm" string causes the parser
to take a slightly different rule, then reject additional relative
values, unless they have a unit, e.g.:

   $ date --debug -d '8pm +5 days'
   date: parsed time part: 08:00:00pm
   date: parsed relative part: +5 day(s)
   [...]

Contrast it with a different (and confusing) rules when there is
no "am/pm", the relative number is always taken as the time zone, e.g.:

   $ date --debug -d '8:00 +5 days'
   date: parsed time part: 08:00:00 UTC+05
   date: parsed relative part: +1 day(s)
   date: input timezone: parsed date/time string (+05)
   [...]

(from https://bugs.gnu.org/17161#31 )

I hope to get to this bug soon.

-assaf




Message sent to bug-coreutils@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#18328: can't say date -d '8pm -0500' though other combos work
In-Reply-To: <87ppfo36er.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: Sat, 20 Oct 2018 06:31:02 +0000
Resent-Message-ID: <handler.18328.B18328.154001703431205 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 18328
X-GNU-PR-Package: coreutils
X-GNU-PR-Keywords: confirmed
To: Assaf Gordon <assafgordon@HIDDEN>
Cc: 18328 <at> debbugs.gnu.org
Received: via spool by 18328-submit <at> debbugs.gnu.org id=B18328.154001703431205
          (code B ref 18328); Sat, 20 Oct 2018 06:31:02 +0000
Received: (at 18328) by debbugs.gnu.org; 20 Oct 2018 06:30:34 +0000
Received: from localhost ([127.0.0.1]:60188 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gDkmQ-00087F-2M
	for submit <at> debbugs.gnu.org; Sat, 20 Oct 2018 02:30:34 -0400
Received: from pop.dreamhost.com ([64.90.62.162]:57632
 helo=pdx1-sub0-mail-a43.g.dreamhost.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <jidanni@HIDDEN>) id 1gDkmM-000875-7p
 for 18328 <at> debbugs.gnu.org; Sat, 20 Oct 2018 02:30:30 -0400
Received: from pdx1-sub0-mail-a43.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a43.g.dreamhost.com (Postfix) with ESMTP id 5CDAE80948;
 Fri, 19 Oct 2018 23:30:29 -0700 (PDT)
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=zJvQIblmhthlhGBqpJV3pM4Pii4=; b=mHKpn6UQIZcDU
 k5XdURvz6gPIHcXs3t/l7Szk5s51kPZ+yj25jEkrnnwxhCc/yNXVdArlU1c36Jl9
 9cAMCNJ2ey+HQlFhfu3MObqJ0SHjPihJCIEa0FQGy9DlUCrUXUWc7g/VM2gUNYtc
 rB/mgO9AHvtWyTpDMR7B14yo6uixjo=
Received: from jidanni.org (220-140-13-84.dynamic-ip.hinet.net [220.140.13.84])
 (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-a43.g.dreamhost.com (Postfix) with ESMTPSA id AA17E80946;
 Fri, 19 Oct 2018 23:30:28 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a43
From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson <jidanni@HIDDEN>
References: <87ppfo36er.fsf@HIDDEN>
 <c8968416-98b5-74ba-ffbe-cd49a23b173c@HIDDEN>
Date: Sat, 20 Oct 2018 14:30:25 +0800
Message-ID: <87sh11dta6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: -100
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrfeejgdduudduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhffffkgggtsehttdertddttdejnecuhfhrohhmpejnnjjnucffrghnucflrggtohgsshhonhcuoehjihgurghnnhhisehjihgurghnnhhirdhorhhgqeenucfkphepvddvtddrudegtddrudefrdekgeenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepjhhiuggrnhhnihdrohhrghdpihhnvghtpedvvddtrddugedtrddufedrkeegpdhrvghtuhhrnhdqphgrthhhpeeprehuthhfqdekreeureehiehmpfehnfhiheehsgevkeerpecuffgrnhculfgrtghosghsohhnuceojhhiuggrnhhnihesjhhiuggrnhhnihdrohhrgheqpdhmrghilhhfrhhomhepjhhiuggrnhhnihesjhhiuggrnhhnihdrohhrghdpnhhrtghpthhtohepudekfedvkeesuggvsggsuhhgshdrghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpedt
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 (/)

AG> I hope to get to this bug soon.

Good.





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.