Subject: bug#59827: closed (Re: bug#59827: [PATCH] info date to be explicit about the date formats)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 06 Dec 2022 02:44:01 +0000

Your bug report

#59827: [PATCH] info date to be explicit about the date formats

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
59827: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59827
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#59827: [PATCH] info date to be explicit about the date formats
From: Paul Eggert <[email-masked]>
To: Marc Chantreux <[email-masked]>
Cc: [email-masked]
Date: Mon, 5 Dec 2022 18:43:43 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks for the suggestion. I installed the attached which isn't exactly 
what you sent but which implements the basic idea.

From 5399f2aac4dc8dd4392a1194dc9bdbb2bcc6272c Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Mon, 5 Dec 2022 18:42:19 -0800
Subject: [PATCH] doc: improve date -I doc

Suggested by Marc Chantreux (bug#59827).
* doc/coreutils.texi (Options for date):
Give formats for -I, like we already do for --rfc-3339.
---
 doc/coreutils.texi | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index c801097ee..a98f7438d 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -16559,22 +16559,25 @@ terms of the time to include.  It can be one of the following:
 @table @samp
 @item auto
 Print just the date.  This is the default if @var{timespec} is omitted.
+This is like the format @code{%Y-%m-%d}.
 
 @item hours
-Append the hour of the day to the date.
+Also print hours and timezone.
+This is like the format @code{%Y-%m-%dT%H%:z}.
 
 @item minutes
-Append the hours and minutes.
+Also print minutes.
+This is like the format @code{%Y-%m-%dT%H:%M%:z}.
 
 @item seconds
-Append the hours, minutes and seconds.
+Also print seconds.
+This is like the format @code{%Y-%m-%dT%H:%M:%S%:z}.
 
 @item ns
-Append the hours, minutes, seconds and nanoseconds.
+Also print nanoseconds.
+This is like the format @code{%Y-%m-%dT%H:%M:%S,%N%:z}.
 @end table
 
-If showing any time terms, then include the time zone using the format
-@samp{%:z}.
 @macro dateParseNote
 This format is always suitable as input
 for the @option{--date} (@option{-d}) and @option{--file}
@@ -16640,19 +16643,19 @@ It can be one of the following:
 @table @samp
 @item date
 Print just the full-date, e.g., @samp{2020-07-21}.
-This is equivalent to the format @samp{%Y-%m-%d}.
+This is like the format @samp{%Y-%m-%d}.
 
 @item seconds
 Print the full-date and full-time separated by a space, e.g.,
 @samp{2020-07-21 04:30:37+05:30}.  The output ends with a numeric
 time-offset; here the @samp{+05:30} means that local time is five
-hours and thirty minutes east of UTC@.  This is equivalent to
+hours and thirty minutes east of UTC@.  This is like
 the format @samp{%Y-%m-%d %H:%M:%S%:z}.
 
 @item ns
 Like @samp{seconds}, but also print nanoseconds, e.g.,
 @samp{2020-07-21 04:30:37.998458565+05:30}.
-This is equivalent to the format @samp{%Y-%m-%d %H:%M:%S.%N%:z}.
+This is like the format @samp{%Y-%m-%d %H:%M:%S.%N%:z}.
 
 @end table
 
-- 
2.38.1

Subject: [PATCH] info date to be explicit about the date formats
From: Marc Chantreux <[email-masked]>
To: [email-masked]
Date: Sun, 4 Dec 2022 22:06:48 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

hello coreutils maintainers,

I would like info page of the date to be explicit about
the ready to use date formats so users can pick them as
example for their own ones (as example: just remove the
timezone information).

regards,
marc

---
 doc/coreutils.texi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index c801097..8c24b52 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -16559,18 +16559,23 @@ terms of the time to include.  It can be one of the following:
 @table @samp
 @item auto
 Print just the date.  This is the default if @var{timespec} is omitted.
+("%Y-%m-%d")
 
 @item hours
 Append the hour of the day to the date.
+("%Y-%m-%dT%H%:z")
 
 @item minutes
 Append the hours and minutes.
+("%Y-%m-%dT%H:%M%:z")
 
 @item seconds
 Append the hours, minutes and seconds.
+("%Y-%m-%dT%H:%M:%S%:z")
 
 @item ns
 Append the hours, minutes, seconds and nanoseconds.
+("%Y-%m-%dT%H:%M:%S,%N%:z")
 @end table
 
 If showing any time terms, then include the time zone using the format
-- 
2.34.1