summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAssaf Gordon <assafgordon@gmail.com>2016-09-08 01:00:23 -0400
committerAssaf Gordon <assafgordon@gmail.com>2016-09-08 01:00:23 -0400
commitc6389a1340cdc2a74dbbba5db13df009ada3c04c (patch)
treee23ca62fded79ce66a6e3400764f511affedc358 /doc
parentd47090d964d31bb4af9872525275372efd3bfdce (diff)
downloadcoreutils-c6389a1340cdc2a74dbbba5db13df009ada3c04c.tar.xz
date: add '--debug' option
Usage example: date --debug -d 'now + 3 days' Print parsing and debugging information to stderr when using date's -d/--date option. See: http://lists.gnu.org/archive/html/coreutils/2016-01/msg00076.html * src/date.c (main): Add '--debug' option, enable debugging in gnulib's parse-datetime.y module. * tests/misc/date.pl: Repeat tests with '--debug' enable, ensure no regression. * tests/misc/date-debug.sh: Test output of '--debug' option. * tests/local.mk: Add above test. * NEWS: Mention new option. * doc/coreutils.texi: Likewise.
Diffstat (limited to 'doc')
-rw-r--r--doc/coreutils.texi12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index cc5e53cf5..95419b44e 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -521,8 +521,8 @@ Include the version number, machine architecture, input files, and
any other information needed to reproduce the bug: your input, what you
expected, what you got, and why it is wrong.
-If you have a problem with @command{sort}, try running @samp{sort
---debug}, as it can can often help find and fix problems without
+If you have a problem with @command{sort} or @command{date}, try using the
+@option{--debug} option, as it can can often help find and fix problems without
having to wait for an answer to a bug report. If the debug output
does not suffice to fix the problem on your own, please compress and
attach it to the rest of your bug report.
@@ -15392,6 +15392,14 @@ date -d "$(LC_TIME=C date)"
@end example
@xref{Date input formats}.
+@item --debug
+@opindex --debug
+@cindex debugging date strings
+@cindex date strings, debugging
+@cindex arbitrary date strings, debugging
+annotate the parsed date, display the effective time zone, and warn about
+potential misuse.
+
@item -f @var{datefile}
@itemx --file=@var{datefile}
@opindex -f