[Bug 238065] Regression in date(1)

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu May 23 03:38:44 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238065

            Bug ID: 238065
           Summary: Regression in date(1)
           Product: Base System
           Version: 12.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: gcr at tharned.org

I noticed recently that `date -r` no longer works:

$ freebsd-version -uk
12.0-RELEASE-p4
12.0-RELEASE-p5

(11.2-RELEASE also seems to be affected)

$ date +%s
1558581709

$ date -r 1558581709
date: -r: unknown option
Usage: date [-aceEiLlmnRsuz] [-d date] [-f format] [-p format] [-T type]
            [-U scale] [ +format | date ... | file ... ]

Interestingly, the above usage message does not match the message compiled into
the date binary:

$ strings /bin/date | fgrep -i usage
usage: date [-jnRu] [-d dst] [-r seconds|file] [-t west] [-v[+|-]val[ymwdHMS]]

But the manual page still says that `date -r` should work as expected:

     -r seconds
             Print the date and time represented by seconds, where seconds is
             the number of seconds since the Epoch (00:00:00 UTC, January 1,
             1970; see time(3)), and can be specified in decimal, octal, or
             hex.

In fact the manual page matches the compiled in usage string and not the usage
message printed when `date -r` errors out. Strange.

I suspect that Revision 282608
<https://svnweb.freebsd.org/base?view=revision&revision=282608> may have
something to do with this.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list