coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Date documentation


From: Michael Partridge
Subject: Re: Date documentation
Date: Tue, 12 Oct 2021 14:00:03 -0700

> It is, although you may have missed it.

Yes I definitely did, thank you. I replied solely to Glenn instead of
reply all. My apologies.

> >
> > I think this default format string should appear in the man page as
> > well.
>
> It already does (since the man page is generated from the --help output):

I meant the default format string as listed in the GNU manual I linked:
`'+%a %b %e %H:%M:%S %Z %Y'`.
https://www.gnu.org/software/coreutils/manual/html_node/date-invocation.html#date-invocation


MCP

On Tue, Oct 12, 2021 at 1:06 PM Eric Blake <eblake@redhat.com> wrote:
>
> On Tue, Oct 12, 2021 at 10:20:28AM -0700, Michael Partridge wrote:
> > Hello,
> > I am reading the date man page for the first time and it seems that a `+`
> > must prefix a format string, but this requirement or behavior is not
> > documented.
>
> It is, although you may have missed it.
>
> $ date --help |head -n1
> Usage: date [OPTION]... [+FORMAT]
>
> >
> > I think this default format string should appear in the man page as
> > well.
>
> It already does (since the man page is generated from the --help output):
>
> NAME
>        date - print or set the system date and time
>
> SYNOPSIS
>        date [OPTION]... [+FORMAT]
>        date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]
>
> In both places, the argument is written +FORMAT to make it obvious
> that without a leading +, you are instead asking date to parse a
> 'MMDDhhmm' argument for setting the system date (likely to fail if not
> executed as root).
>
> That said, if you have a proposed patch to make the existing
> documentation clearer, we're open to the idea.
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3266
> Virtualization:  qemu.org | libvirt.org
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]