Your message dated Mon, 6 Nov 2017 10:59:06 -0500
with message-id <[email protected]>
and subject line Re: Bug#880977: date -I: wrong manpage example
has caused the Debian Bug report #880977,
regarding date -I: wrong manpage example
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
880977: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=880977
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: coreutils
Version: 8.28-1
Severity: normal

manpage for "date" is as follows:

       -I[FMT], --iso-8601[=FMT]
              output  date/time  in ISO 8601 format.  FMT='date' for date only
              (the default), 'hours', 'minutes', 'seconds', or 'ns'  for  date
              and    time    to    the    indicated    precision.     Example:
              2006-08-14T02:34:56-06:00
...

       --rfc-3339=FMT
              output  date/time in RFC 3339 format.  FMT='date', 'seconds', or
              'ns' for date and time to  the  indicated  precision.   Example:
              2006-08-14 02:34:56-06:00

Here is the actual results:

$ date -Iseconds -d@0
1970-01-01T09:00:00+09:00
$ date --iso-8601=seconds -d@0
1970-01-01T09:00:00+09:00

$ date --rfc-3339=seconds -d@0
1970-01-01 09:00:00+09:00

Clearly, -I, --iso-8601= examples are wrong.  So this is a bug.

Osamu

PS: The use of @ is not explicitly defined but is captured in the
EXAMPLES in the manpage as "$ date --date='@2147483647'".  So wishlist
bugs #590455 and #696115 is valid request to be forwarded to the
upstream.

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.13.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages coreutils depends on:
ii  libacl1      2.2.52-3+b1
ii  libattr1     1:2.4.47-2+b2
ii  libc6        2.24-17
ii  libselinux1  2.7-2

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
On Tue, Nov 07, 2017 at 12:35:35AM +0900, Osamu Aoki wrote:
Package: coreutils
Version: 8.28-1
Severity: normal

manpage for "date" is as follows:

      -I[FMT], --iso-8601[=FMT]
             output  date/time  in ISO 8601 format.  FMT='date' for date only
             (the default), 'hours', 'minutes', 'seconds', or 'ns'  for  date
             and    time    to    the    indicated    precision.     Example:
             2006-08-14T02:34:56-06:00
...

      --rfc-3339=FMT
             output  date/time in RFC 3339 format.  FMT='date', 'seconds', or
             'ns' for date and time to  the  indicated  precision.   Example:
             2006-08-14 02:34:56-06:00

Here is the actual results:

$ date -Iseconds -d@0
1970-01-01T09:00:00+09:00
$ date --iso-8601=seconds -d@0
1970-01-01T09:00:00+09:00

$ date --rfc-3339=seconds -d@0
1970-01-01 09:00:00+09:00

Clearly, -I, --iso-8601= examples are wrong.  So this is a bug.

I don't understand what you think is wrong.

$ date -Ins -d @0
1969-12-31T19:00:00,000000000-05:00
$ date -Iseconds -d @0
1969-12-31T19:00:00-05:00
$ date -Iminutes -d @0
1969-12-31T19:00-05:00
$ date -Ihours -d @0
1969-12-31T19-05:00

The precision dictates the number of digits in the output, which is exactly what's happening in your example.

PS: The use of @ is not explicitly defined but is captured in the
EXAMPLES in the manpage as "$ date --date='@2147483647'".  So wishlist
bugs #590455 and #696115 is valid request to be forwarded to the
upstream.

From the man page:

DATE STRING
      The --date=STRING is a mostly free format human readable date string such as 
"Sun, 29
      Feb  2004  16:21:42  -0800" or "2004-02-29 16:21:42" or even "next 
Thursday".  A date
      string may contain items indicating calendar date, time of day,  time  
zone,  day  of
      week,  relative  time,  relative  date,  and  numbers.  An empty string 
indicates the
      beginning of the day.  The date string format is more complex than  is  
easily  docu‐
      mented here but is fully described in the info documentation.

Clicking on the "SEE ALSO" link will pretty quickly get you to https://www.gnu.org/software/coreutils/manual/html_node/Date-input-formats.html#Date-input-formats and https://www.gnu.org/software/coreutils/manual/html_node/Seconds-since-the-Epoch.html#Seconds-since-the-Epoch

Mike Stone

--- End Message ---

Reply via email to