From unknown Tue Jun 17 21:53:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11115: linux date arithmetic Resent-From: Stefan Karamuz Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 28 Mar 2012 17:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11115 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 11115@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.133295748824170 (code B ref -1); Wed, 28 Mar 2012 17:59:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Mar 2012 17:58:08 +0000 Received: from localhost ([127.0.0.1]:43610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCx8J-0006Hi-BD for submit@debbugs.gnu.org; Wed, 28 Mar 2012 13:58:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59934) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCtdl-0007jg-3U for submit@debbugs.gnu.org; Wed, 28 Mar 2012 10:14:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCt9O-0004Bc-79 for submit@debbugs.gnu.org; Wed, 28 Mar 2012 09:42:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:38067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCt9O-0004BI-3k for submit@debbugs.gnu.org; Wed, 28 Mar 2012 09:42:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCt9H-0007VJ-JR for bug-coreutils@gnu.org; Wed, 28 Mar 2012 09:42:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCt9B-0003uD-2y for bug-coreutils@gnu.org; Wed, 28 Mar 2012 09:42:50 -0400 Received: from 031011181080.warszawa.vectranet.pl ([31.11.181.80]:42962 helo=dns.karamuz.pl) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCt98-0003nZ-Fx for bug-coreutils@gnu.org; Wed, 28 Mar 2012 09:42:45 -0400 Received: from dns.karamuz.pl (dns.karamuz.pl [127.0.0.1]) by dns.karamuz.pl (8.14.5/8.14.4) with ESMTP id q2SCdBOe013150 for ; Wed, 28 Mar 2012 14:39:11 +0200 Message-ID: <4F73066F.4050509@karamuz.pl> Date: Wed, 28 Mar 2012 14:39:11 +0200 From: Stefan Karamuz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120316 Thunderbird/11.0 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------040505040402060601010900" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -1.9 (-) X-Mailman-Approved-At: Wed, 28 Mar 2012 13:58:00 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is a multi-part message in MIME format. --------------040505040402060601010900 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Please check the 2 linux commands: date -d "$(date +%F\ %H:%M:%S)" +%F\ %H:%M:%S date -d "$(date +%F\ %H:%M:%S) + 1 minute" +%F\ %H:%M:%S It's very confusing, because the results of the two commands differ in one hour and one minute, except of one minute only. [~]$ date -d "$(date +%F\ %H:%M)" +%F\ %H:%M:%S 2012-03-28 14:06:00 ... and after a few seconds: [~]$ date -d "$(date +%F\ %H:%M:%S) + 1 minute" +%F\ %H:%M:%S 2012-03-28 15:07:20 It's a bug or I don't understand something? The systems tested include: Fedora 16 Centos 6.2 Debian *6.0.4 *Best Regards, Stefan Karamuz --------------040505040402060601010900 Content-Type: text/html; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by dns.karamuz.pl id q2SCdBOe013150 Please check the 2 linux commands:

date -d "$(date +%F\ %H:%M:%S)" +%F\ %H:%M:%S
date -d "$(date +%F\ %H:%M:%S) + 1 minute" +%F\ %H:%M:%S

It's very confusing, because the results of the two commands differ in one hour and one minute, except of one minute only.

[~]$ date -d "$(date +%F\ %H:%M)" +%F\ %H:%M:%S
2012-03-28 14:06:00

... and after a few seconds:

[~]$ date -d "$(date +%F\ %H:%M:%S) + 1 minute" +%F\ %H:%M:%S
2012-03-28 15:07:20

It's a bug or I don't understand something?

The systems tested include:

Fedora 16
Centos 6.2
Debian 6.0.4

Best Regards,

=A0=A0=A0 Stefan Karamuz










--------------040505040402060601010900-- From unknown Tue Jun 17 21:53:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11115: linux date arithmetic Resent-From: Eric Blake Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 28 Mar 2012 18:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11115 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Stefan Karamuz Cc: bug-gnulib , 11115@debbugs.gnu.org Received: via spool by 11115-submit@debbugs.gnu.org id=B11115.133295895726460 (code B ref 11115); Wed, 28 Mar 2012 18:23:01 +0000 Received: (at 11115) by debbugs.gnu.org; 28 Mar 2012 18:22:37 +0000 Received: from localhost ([127.0.0.1]:43629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCxW0-0006sf-08 for submit@debbugs.gnu.org; Wed, 28 Mar 2012 14:22:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60988) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCxVP-0006rZ-Vb for 11115@debbugs.gnu.org; Wed, 28 Mar 2012 14:22:33 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2SHoa2N005019 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 28 Mar 2012 13:50:36 -0400 Received: from [10.3.113.31] (ovpn-113-31.phx2.redhat.com [10.3.113.31]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2SHoZwV019380; Wed, 28 Mar 2012 13:50:35 -0400 Message-ID: <4F734F6A.708@redhat.com> Date: Wed, 28 Mar 2012 11:50:34 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120316 Thunderbird/11.0 MIME-Version: 1.0 References: <4F73066F.4050509@karamuz.pl> In-Reply-To: <4F73066F.4050509@karamuz.pl> X-Enigmail-Version: 1.4 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigA66425C47496576339FB2847" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA66425C47496576339FB2847 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable [adding bug-gnulib] On 03/28/2012 06:39 AM, Stefan Karamuz wrote: > Please check the 2 linux commands: >=20 > date -d "$(date +%F\ %H:%M:%S)" +%F\ %H:%M:%S > date -d "$(date +%F\ %H:%M:%S) + 1 minute" +%F\ %H:%M:%S >=20 > It's very confusing, because the results of the two commands differ in > one hour and one minute, except of one minute only. >=20 > [~]$ date -d "$(date +%F\ %H:%M)" +%F\ %H:%M:%S > 2012-03-28 14:06:00 >=20 > ... and after a few seconds: >=20 > [~]$ date -d "$(date +%F\ %H:%M:%S) + 1 minute" +%F\ %H:%M:%S > 2012-03-28 15:07:20 Thanks for the report. It's easier to debug if you use the same starting point for both commands rather than nesting an ever-changing $(date) to feed the outermost 'date -d', but I can indeed reproduce your behavior, as well as explain it: $ date -d '2012-03-28 11:38' +%H:%M:%S 11:38:00 Starting point. $ date -d '2012-03-28 11:38 +1' +%H:%M:%S 04:38:00 Aha - '11:38 +1' is parsed as a time zone designation. In my case, since I'm in UTC-6, or 7 time zones away from UTC+1, that explains why my output jumped backwards by 7 hours; I'm assuming your location is at UTC+2. $ date -d '2012-03-28 11:38 +minute' +%H:%M:%S 11:39:00 Notice that 'minute' can be parsed without units. $ date -d '2012-03-28 11:38 + 1 minute' +%H:%M:%S 04:39:00 Therefore, the parser is faced with an ambiguity between: (11:38 +1) minute 11:38 (+1 minute) and happened to choose the result you consider to be less intuitive. But looks what happen if you rearrange the command line: $ date -d '+1 minute 2012-03-28 11:38' +%H:%M:%S 11:39:00 Now there is no ambiguity. I don't know if this is something adequately explained in our FAQ: https://www.gnu.org/software/coreutils/faq/#The-date-command-is-not-worki= ng-right_002e nor do I know if it might be possible to patch gnulib's getdate.y to make the parsing smarter, but you are welcome to try patching it. In fact, I'd go so far as to say getdate.y has a bug; '+1' is a reasonable time zone designator when it occurs after hh:mm, but I've never seen '+ 1' meant as a time zone, so it seems like the presence of space after '+' should be used to alter the parse precedence. So I'm not sure whether to leave this bug open (in hopes of someone writing a patch) or to close it (since the behavior is explainable, even if not what you wanted, and can be worked around with a little reordering on your part). --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigA66425C47496576339FB2847 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPc09rAAoJEKeha0olJ0NqwtUH/juGp8u/8EOuqFNeFqHik5Rt /mWomEZAzWfJE0pTxlmDo+w5Qp9IqtcKrSvVipHsDU0RXTSR754Ki0btVmucyIw0 JOIOhjq+7M7m8hd96oi9iOew/wcrK46EYW/yrljHSuNoERlepaV8uyYrJDkvy8UM XlVLF96zsCvTUrKUeo5d6uHQ2kCmF9Ie6mA4zwpf07U1t+wRpxThmkBIj38nfOof btGL0IwT0OyCCENVJq4u3K6c5JZT57ZJQdTtm4AHaFFtFKJZUMaUAttWU9YQq+L8 1XqgbRnwcX6i0KcAlwmF1rZlkwgHezOw4LkG1UQKJqRqXceLzWAf19KsKhD3thI= =oF8H -----END PGP SIGNATURE----- --------------enigA66425C47496576339FB2847-- From unknown Tue Jun 17 21:53:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11115: linux date arithmetic Resent-From: Ruediger Meier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 28 Mar 2012 18:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11115 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 11115@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.133296049228795 (code B ref -1); Wed, 28 Mar 2012 18:49:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Mar 2012 18:48:12 +0000 Received: from localhost ([127.0.0.1]:43645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCxul-0007UM-CE for submit@debbugs.gnu.org; Wed, 28 Mar 2012 14:48:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54508) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SCxuU-0007Tl-T2 for submit@debbugs.gnu.org; Wed, 28 Mar 2012 14:48:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCxQ1-0005ka-9r for submit@debbugs.gnu.org; Wed, 28 Mar 2012 14:16:32 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:60360) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCxQ1-0005kW-6m for submit@debbugs.gnu.org; Wed, 28 Mar 2012 14:16:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCxPz-0007QR-7x for bug-coreutils@gnu.org; Wed, 28 Mar 2012 14:16:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCxPw-0005jV-0A for bug-coreutils@gnu.org; Wed, 28 Mar 2012 14:16:22 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:56495) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SCxPv-0005jC-N4 for bug-coreutils@gnu.org; Wed, 28 Mar 2012 14:16:19 -0400 Received: (qmail invoked by alias); 28 Mar 2012 18:16:16 -0000 Received: from dslb-088-074-014-058.pools.arcor-ip.net (EHLO dslb-088-074-014-058.pools.arcor-ip.net) [88.74.14.58] by mail.gmx.net (mp020) with SMTP; 28 Mar 2012 20:16:16 +0200 X-Authenticated: #11967524 X-Provags-ID: V01U2FsdGVkX1/9vTFMD9D9Pe80BGdJ0oOT1RPuVR7PsU+Kh3L8kW wHtH1Dv7U/7g/8 From: Ruediger Meier Date: Wed, 28 Mar 2012 19:16:15 +0100 User-Agent: KMail/1.9.10 References: <4F73066F.4050509@karamuz.pl> <4F734F6A.708@redhat.com> In-Reply-To: <4F734F6A.708@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201203282016.16040.sweet_f_a@gmx.de> X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) On Wednesday 28 March 2012, Eric Blake wrote: > [adding bug-gnulib] > > On 03/28/2012 06:39 AM, Stefan Karamuz wrote: > > Please check the 2 linux commands: > > > > date -d "$(date +%F\ %H:%M:%S)" +%F\ %H:%M:%S > > date -d "$(date +%F\ %H:%M:%S) + 1 minute" +%F\ %H:%M:%S > > > > It's very confusing, because the results of the two commands differ > > in one hour and one minute, except of one minute only. > > > > [~]$ date -d "$(date +%F\ %H:%M)" +%F\ %H:%M:%S > > 2012-03-28 14:06:00 > > > > ... and after a few seconds: > > > > [~]$ date -d "$(date +%F\ %H:%M:%S) + 1 minute" +%F\ %H:%M:%S > > 2012-03-28 15:07:20 > > Thanks for the report. It's easier to debug if you use the same > starting point for both commands rather than nesting an ever-changing > $(date) to feed the outermost 'date -d', but I can indeed reproduce > your behavior, as well as explain it: > > $ date -d '2012-03-28 11:38' +%H:%M:%S > 11:38:00 > > Starting point. > > $ date -d '2012-03-28 11:38 +1' +%H:%M:%S > 04:38:00 > > Aha - '11:38 +1' is parsed as a time zone designation. In my case, > since I'm in UTC-6, or 7 time zones away from UTC+1, that explains > why my output jumped backwards by 7 hours; I'm assuming your location > is at UTC+2. > > $ date -d '2012-03-28 11:38 +minute' +%H:%M:%S > 11:39:00 > > Notice that 'minute' can be parsed without units. BTW I think that the parser syntax for -d got very unlucky implemented. IMO dates and intervals should have been clearly separated somehow. For me the parser is too much intelligent and does not what the user would expect. Maybe there should be a separate option --add which takes only intervals (negative or positive) to be added to the stamp comming from -r,-d,-f or now. cu, Rudi > $ date -d '2012-03-28 11:38 + 1 minute' +%H:%M:%S > 04:39:00 > > Therefore, the parser is faced with an ambiguity between: > > (11:38 +1) minute > 11:38 (+1 minute) > > and happened to choose the result you consider to be less intuitive. > But looks what happen if you rearrange the command line: > > $ date -d '+1 minute 2012-03-28 11:38' +%H:%M:%S > 11:39:00 > > Now there is no ambiguity. > > I don't know if this is something adequately explained in our FAQ: > https://www.gnu.org/software/coreutils/faq/#The-date-command-is-not-w >orking-right_002e > > nor do I know if it might be possible to patch gnulib's getdate.y to > make the parsing smarter, but you are welcome to try patching it. In > fact, I'd go so far as to say getdate.y has a bug; '+1' is a > reasonable time zone designator when it occurs after hh:mm, but I've > never seen '+ 1' meant as a time zone, so it seems like the presence > of space after '+' should be used to alter the parse precedence. > > So I'm not sure whether to leave this bug open (in hopes of someone > writing a patch) or to close it (since the behavior is explainable, > even if not what you wanted, and can be worked around with a little > reordering on your part). From unknown Tue Jun 17 21:53:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11115: linux date arithmetic Resent-From: Bruno Haible Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 28 Mar 2012 21:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11115 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: bug-gnulib@gnu.org Cc: Eric Blake , 11115@debbugs.gnu.org, Stefan Karamuz Received: via spool by 11115-submit@debbugs.gnu.org id=B11115.133297165213686 (code B ref 11115); Wed, 28 Mar 2012 21:55:01 +0000 Received: (at 11115) by debbugs.gnu.org; 28 Mar 2012 21:54:12 +0000 Received: from localhost ([127.0.0.1]:43772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SD0ok-0003Yf-9W for submit@debbugs.gnu.org; Wed, 28 Mar 2012 17:54:11 -0400 Received: from mo-p00-ob.rzone.de ([81.169.146.162]:22474) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SD0oC-0003X8-5c for 11115@debbugs.gnu.org; Wed, 28 Mar 2012 17:54:09 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1332969731; l=344; s=domk; d=haible.de; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Date:Subject:Cc:To:From:X-RZG-CLASS-ID:X-RZG-AUTH; bh=bkVaSx6PtEGPucFB4KQjUNlzlE0=; b=YdnQqqjuh0uOVPX6Pj0r05vL5ctvK9A9fSnD3RyU+nnUFV9zxgkE6A+wFwMssGYkrDK 6xcfZLLkyPt9YIFoYC5AYjvaS/1F5vn6egrQPYTrhWrV/LHdFydFO0CU3X4GmNjKmz4fD CcgHpq/d+qwK/vnL4tMZJ6W7koEA1i622Ko= X-RZG-AUTH: :Ln4Re0+Ic/6oZXR1YgKryK8brksyK8dozXDwHXjf9hj/zDNRbvY44zMkpA== X-RZG-CLASS-ID: mo00 Received: from linuix.haible.de (dslb-088-068-070-142.pools.arcor-ip.net [88.68.70.142]) by post.strato.de (mrclete mo26) (RZmta 28.2 DYNA|AUTH) with ESMTPA id t023bfo2SJkkIs ; Wed, 28 Mar 2012 23:22:10 +0200 (MEST) From: Bruno Haible Date: Wed, 28 Mar 2012 23:23:34 +0200 Message-ID: <5738206.bFd9qz0SX0@linuix> User-Agent: KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; ) In-Reply-To: <4F734F6A.708@redhat.com> References: <4F73066F.4050509@karamuz.pl> <4F734F6A.708@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Eric Blake wrote: > the parser is faced with an ambiguity between: > > (11:38 +1) minute > 11:38 (+1 minute) What is the first interpretation meant to mean? "10:38 minute" or "12:38 minute" is not a time designation I have ever heard in spoken nor written English. If you ditch this interpretation, there is no ambiguity. Bruno From unknown Tue Jun 17 21:53:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11115: linux date arithmetic Resent-From: Eric Blake Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 28 Mar 2012 22:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11115 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Bruno Haible Cc: bug-gnulib@gnu.org, 11115@debbugs.gnu.org, Stefan Karamuz Received: via spool by 11115-submit@debbugs.gnu.org id=B11115.133297391317094 (code B ref 11115); Wed, 28 Mar 2012 22:32:02 +0000 Received: (at 11115) by debbugs.gnu.org; 28 Mar 2012 22:31:53 +0000 Received: from localhost ([127.0.0.1]:43788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SD1Ov-0004RE-BR for submit@debbugs.gnu.org; Wed, 28 Mar 2012 18:31:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3686) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SD1OK-0004QA-FQ for 11115@debbugs.gnu.org; Wed, 28 Mar 2012 18:31:31 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2SLxUKv014461 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 28 Mar 2012 17:59:30 -0400 Received: from [10.3.113.31] (ovpn-113-31.phx2.redhat.com [10.3.113.31]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q2SLxTKK018899; Wed, 28 Mar 2012 17:59:29 -0400 Message-ID: <4F7389C0.9090808@redhat.com> Date: Wed, 28 Mar 2012 15:59:28 -0600 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120316 Thunderbird/11.0 MIME-Version: 1.0 References: <4F73066F.4050509@karamuz.pl> <4F734F6A.708@redhat.com> <5738206.bFd9qz0SX0@linuix> In-Reply-To: <5738206.bFd9qz0SX0@linuix> X-Enigmail-Version: 1.4 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig3DE20D7DAB0AE8CC4C061EBB" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3DE20D7DAB0AE8CC4C061EBB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03/28/2012 03:23 PM, Bruno Haible wrote: > Eric Blake wrote: >> the parser is faced with an ambiguity between: >> >> (11:38 +1) minute >> 11:38 (+1 minute) >=20 > What is the first interpretation meant to mean? The time 11:38 in the timezone UTC+1, plus the unit represented by 'minut= e'. > "10:38 minute" or "12:38 minute" is not a time designation I have ever = heard > in spoken nor written English. True, 'minute' in isolation, without a 'plus one' qualifier, is unusual; but we have to continue to parse it in isolation since scripts may now be relying on it. >=20 > If you ditch this interpretation, there is no ambiguity. Yes, we're in violent agreement here: the added context of a +1 (and in particular, of a '+ 1' with a space after the +), should indeed favor the spoken preference of a time with no timezone, followed by a completed relative designation; rather than of a relative designation with only an implied quantity. It's just that getdate.y is a hairy mess to properly implement that change without breaking other worthwhile constructs, so I won't be the one volunteering. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig3DE20D7DAB0AE8CC4C061EBB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPc4nAAAoJEKeha0olJ0NqTTcH/3XVVes45JyLCMxzskKQSnos LzezTv3Xg/pET7S0/31vh8cT1vYkAI0IH2OFFJVH6JzmQUOa9NJcIszhT56i8KKx HeU9d1r9s+2a5i4FFt33A0h/Y0Sy+VluTK/cBXsN50pmO4mZIPSmansezhrYRU/I ++V4ojTMc4lXlW5r3UqxesZFYQGX+mWa56S86yDhXsUm4MmS6Gjwzw8hXWAJI1qF ct0g9qQynYLuAZDwJ1HvNtS1S0gFNt81Le69zbPe9OCrT4QzN8toXhiKfXopmkfn cP0m6agWr10c08SVgVhRNDGKZjI+DlvHvGCUIEXEUyirV811Xx3cxjAEnP4C0S0= =eXSh -----END PGP SIGNATURE----- --------------enig3DE20D7DAB0AE8CC4C061EBB-- From unknown Tue Jun 17 21:53:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11115: linux date arithmetic Resent-From: Ruediger Meier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 29 Mar 2012 01:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11115 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 11115@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13329857402404 (code B ref -1); Thu, 29 Mar 2012 01:49:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Mar 2012 01:49:00 +0000 Received: from localhost ([127.0.0.1]:43882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SD4Ty-0000cg-4O for submit@debbugs.gnu.org; Wed, 28 Mar 2012 21:48:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55453) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SD4Tk-0000cK-Ty for submit@debbugs.gnu.org; Wed, 28 Mar 2012 21:48:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SD3zL-0001u7-5z for submit@debbugs.gnu.org; Wed, 28 Mar 2012 21:17:20 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:46358) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SD3zL-0001ty-37 for submit@debbugs.gnu.org; Wed, 28 Mar 2012 21:17:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SD3zJ-00012W-6p for bug-coreutils@gnu.org; Wed, 28 Mar 2012 21:17:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SD3zH-0001sU-6Z for bug-coreutils@gnu.org; Wed, 28 Mar 2012 21:17:16 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:40440) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SD3zG-0001ri-S8 for bug-coreutils@gnu.org; Wed, 28 Mar 2012 21:17:15 -0400 Received: (qmail invoked by alias); 29 Mar 2012 01:17:12 -0000 Received: from dslb-088-074-014-058.pools.arcor-ip.net (EHLO dslb-088-074-014-058.pools.arcor-ip.net) [88.74.14.58] by mail.gmx.net (mp004) with SMTP; 29 Mar 2012 03:17:12 +0200 X-Authenticated: #11967524 X-Provags-ID: V01U2FsdGVkX1++BskO1/C+srSDXye4llqUhz7VkUd3QG/lzyQCql VBNL5g8TqZwH1k From: Ruediger Meier Date: Thu, 29 Mar 2012 02:17:11 +0100 User-Agent: KMail/1.9.10 References: <4F73066F.4050509@karamuz.pl> <5738206.bFd9qz0SX0@linuix> <4F7389C0.9090808@redhat.com> In-Reply-To: <4F7389C0.9090808@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201203290317.12618.sweet_f_a@gmx.de> X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) On Wednesday 28 March 2012, Eric Blake wrote: > On 03/28/2012 03:23 PM, Bruno Haible wrote: > > Eric Blake wrote: > >> the parser is faced with an ambiguity between: > >> > >> (11:38 +1) minute > >> 11:38 (+1 minute) > > > > What is the first interpretation meant to mean? > > The time 11:38 in the timezone UTC+1, plus the unit represented by > 'minute'. > > > "10:38 minute" or "12:38 minute" is not a time designation I have > > ever heard in spoken nor written English. > > True, 'minute' in isolation, without a 'plus one' qualifier, is > unusual; but we have to continue to parse it in isolation since > scripts may now be relying on it. > > > If you ditch this interpretation, there is no ambiguity. > > Yes, we're in violent agreement here: the added context of a +1 (and > in particular, of a '+ 1' with a space after the +), should indeed > favor the spoken preference of a time with no timezone, followed by a > completed relative designation; rather than of a relative designation > with only an implied quantity. It's just that getdate.y is a hairy > mess to properly implement that change without breaking other > worthwhile constructs, so I won't be the one volunteering. BTW there is an interesting dateutils project not yet finished but worth to have look https://github.com/hroptatyr/dateutils cu, Rudi From unknown Tue Jun 17 21:53:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11115: linux date arithmetic Resent-From: Bruno Haible Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 29 Mar 2012 09:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11115 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Eric Blake Cc: bug-gnulib@gnu.org, 11115@debbugs.gnu.org, Stefan Karamuz Received: via spool by 11115-submit@debbugs.gnu.org id=B11115.133301472415931 (code B ref 11115); Thu, 29 Mar 2012 09:53:02 +0000 Received: (at 11115) by debbugs.gnu.org; 29 Mar 2012 09:52:04 +0000 Received: from localhost ([127.0.0.1]:44085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDC1T-00048t-OB for submit@debbugs.gnu.org; Thu, 29 Mar 2012 05:52:04 -0400 Received: from mo-p00-ob.rzone.de ([81.169.146.160]:30197) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SDC1C-00048E-Qp for 11115@debbugs.gnu.org; Thu, 29 Mar 2012 05:52:02 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1333012818; l=1085; s=domk; d=haible.de; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Date:Subject:Cc:To:From:X-RZG-CLASS-ID:X-RZG-AUTH; bh=ogT8tNllC7R4gwBuCWuRsUTeq6k=; b=eVcmkI+n6vHdi3Sn2HSTi5mxMoqcbU54O8Xnl2GImNO2uNUpxlrSOR+5V+l/MmYCPUv TCUh5dWdgRClEF71K+nW+OekLUMPm8qvvvvkVKuoRKgmFVWVNbDBipBfbujYLI6A0xI+o 6Nl1BtYRA9NgLdUwLauLyxQ+sBK6W0/KV9w= X-RZG-AUTH: :Ln4Re0+Ic/6oZXR1YgKryK8brksyK8dozXDwHXjf9hj/zDNRbvY44zMkpA== X-RZG-CLASS-ID: mo00 Received: from linuix.haible.de (dslb-088-068-070-142.pools.arcor-ip.net [88.68.70.142]) by post.strato.de (mrclete mo32) (RZmta 28.2 DYNA|AUTH) with ESMTPA id V02798o2T98fik ; Thu, 29 Mar 2012 11:20:17 +0200 (MEST) From: Bruno Haible Date: Thu, 29 Mar 2012 11:21:40 +0200 Message-ID: <27221650.kDpBLfNbf4@linuix> User-Agent: KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; ) In-Reply-To: <4F7389C0.9090808@redhat.com> References: <4F73066F.4050509@karamuz.pl> <5738206.bFd9qz0SX0@linuix> <4F7389C0.9090808@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Eric Blake wrote: > > "10:38 minute" or "12:38 minute" is not a time designation I have ever heard > > in spoken nor written English. > > True, 'minute' in isolation, without a 'plus one' qualifier, is unusual; > but we have to continue to parse it in isolation since scripts may now > be relying on it. No, we don't have to support syntaxes that are not documented and that were only accidentally supported. Scripts may rely on documented features, not on undocumented ones. The doc in parse-datetime.texi explains that the literal word 'minute' occurs only as part of a displacement. Thus it has to follow a number. It can not occur after a literal time ("10:38" or "12:38") nor after a time with displacement ("11:38 +1"). IMO spaces are irrelevant in this discussion. > It's just that getdate.y is a hairy mess > to properly implement that change without breaking other worthwhile > constructs I would remove the "tMINUTE_UNIT" alternative from 'relunit' and move it instead to the rules that invoke 'relunit' and that need this alternative. Bruno From unknown Tue Jun 17 21:53:51 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11115: linux date arithmetic Resent-From: Assaf Gordon Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Mon, 15 Oct 2018 16:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11115 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Stefan Karamuz , 11115@debbugs.gnu.org Received: via spool by 11115-submit@debbugs.gnu.org id=B11115.153962161331600 (code B ref 11115); Mon, 15 Oct 2018 16:41:02 +0000 Received: (at 11115) by debbugs.gnu.org; 15 Oct 2018 16:40:13 +0000 Received: from localhost ([127.0.0.1]:51058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gC5ue-0008DW-RU for submit@debbugs.gnu.org; Mon, 15 Oct 2018 12:40:13 -0400 Received: from mail-it1-f181.google.com ([209.85.166.181]:50233) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gC5uc-0008DB-LT; Mon, 15 Oct 2018 12:40:11 -0400 Received: by mail-it1-f181.google.com with SMTP id k206-v6so23470760ite.0; Mon, 15 Oct 2018 09:40: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=I867cvgKayGfQjU0SZO2oeDKd7BXmZUlCUB5LMR9DU0=; b=Ie+kiA7vQ3i+rWPtLIeXRqoLeqmiA8BSyU41SBlUwMzvN1Dyq7De5sF9/vwbaf51bZ fv57/KmQKU/4BYlyUpP+q7xrO7PH5Qa5vJX0DFu1sg8iNbNINl227wavPg7XxiZHSv9A tNlqnlYqonB8JLf2yGwGPuh/q+JIXB1XZmOYI3xE6YNxdksuXW8xDrtcJ+toVKezqUG0 D8tgrncckiDEKYcms7Bom/yrLvwcId9A6G6hlWH0DMPQK4bBpuIugk+PR0460N33xYpY 9tK69kPbbKsfXvKIWBY1/t0K+DylravhzqnkkRqtN/jB58WHsWQfkN9fr5xrZCk8EbzW R3Og== 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=I867cvgKayGfQjU0SZO2oeDKd7BXmZUlCUB5LMR9DU0=; b=G1DJLcOD7mK4BBbTVe5GjNgEsK+tBzsBEgzoYZoxGbBKDPQbBAmB5abgZ5VbqzW3i9 mail5K9SqJEoSI92zu4o5dxuWFX2JTJSimYvRgUtBfeMV0UKmpaSsrFgG7hBd0CG3hTC IgMA4O/mCnH3XbkNn7uT3QISfHHlcVD5QeI55AWUtbOox1attY29djumgToQCKYgFhAs lsZ+chxONhz1KMkWx3t068Uh3bfZ4w78BBQDDVW8c6anAApho0tY8ff0aLHBgCncsqIc UoZsT4LtQY1K5F1fkyMdhIbe1/O2N9abworm9e+C5p8Hi7kua0Q1Dgx3aaCiomuIy6ed o4Xg== X-Gm-Message-State: ABuFfoiLVQyey0fyRCt2G59dxjAy/dez03XvK9jqyOhVlhdDDIaykuAv sBKFhT3lUo8ZDA/VT3rOrU5LqV8YgHw= X-Google-Smtp-Source: ACcGV60PevsMZxrvinjeihPfA02PUWAFJjrARWbaB+x1gjwrQD69jNYTtltsPYUIu6RJOEXlV9Xd1A== X-Received: by 2002:a24:94d:: with SMTP id 74-v6mr12683910itm.178.1539621604441; Mon, 15 Oct 2018 09:40:04 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id m11-v6sm3151046ioq.35.2018.10.15.09.40.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Oct 2018 09:40:02 -0700 (PDT) References: <4F73066F.4050509@karamuz.pl> From: Assaf Gordon Message-ID: <68eef639-ccc7-4e32-409b-f12014425659@gmail.com> Date: Mon, 15 Oct 2018 10:40:01 -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: <4F73066F.4050509@karamuz.pl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -0.0 (/) 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: -1.0 (-) tags 11115 notabug close 11115 stop (triaging old bugs) Hello, On 28/03/12 06:39 AM, Stefan Karamuz wrote: > Please check the 2 linux commands: > > date -d "$(date +%F\ %H:%M:%S)" +%F\ %H:%M:%S > date -d "$(date +%F\ %H:%M:%S) + 1 minute" +%F\ %H:%M:%S > > It's very confusing, because the results of the two commands differ in > one hour and one minute, except of one minute only. In version 8.26 (released 2016) date gained the "--debug" option which can help in understanding such issues. The "+1" is taken to be "UTC+1" time zone, as shown here: $ date --debug -d "$(date +%F\ %H:%M:%S)" +%F\ %H:%M:%S date: parsed date part: (Y-M-D) 2018-10-15 date: parsed time part: 10:35:21 date: input timezone: system default [...] $ date --debug -d "$(date +%F\ %H:%M:%S) + 1 minute" +%F\ %H:%M:%S date: parsed date part: (Y-M-D) 2018-10-15 date: parsed time part: 10:35:27 UTC+01 date: parsed relative part: +1 minutes date: input timezone: parsed date/time string (+01) [...] I'm closing this bug, but discussion can continue by replying to this thread. regards, - assaf