GNU bug report logs - #44959
date error message should say -I

Previous Next

Package: coreutils;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Mon, 30 Nov 2020 13:15:01 UTC

Severity: normal

Full log


Message #8 received at 44959 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>,
 44959 <at> debbugs.gnu.org
Subject: Re: bug#44959: date error message should say -I
Date: Mon, 30 Nov 2020 14:40:24 +0100
On 11/30/20 2:13 PM, 積丹尼 Dan Jacobson wrote:
> $ date -I=seconds
> date: invalid argument ‘=seconds’ for ‘--iso-8601’

Hmm, first of all, 'date' 8.32 outputs more than the above:

  $ date -I=seconds
  date: invalid argument '=seconds' for '--iso-8601'
  Valid arguments are:
    - 'hours'
    - 'minutes'
    - 'date'
    - 'seconds'
    - 'ns'
  Try 'date --help' for more information.

> Hey, that is a valid argument for --iso-8601. (But not for -I, so say
> that instead.)
...
> date (GNU coreutils) 8.32

From the above error message and from the --help output, one can see that
the -I option does not require the argument to be appended with "=FMT" but
just "FMT":

  $ date --help | grep -- -I
    -I[FMT], --iso-8601[=FMT]  output date/time in ISO 8601 format.

So, I'd say 'date' works as expected:

  $ date -Iseconds
  2020-11-30T14:38:35+01:00

Have a nice day,
Berny




This bug report was last modified 4 years and 196 days ago.

Previous Next


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