Commit Graph

97 Commits

Author SHA1 Message Date
Mateusz Piotrowski
de7a6b6fd0 date.1: Examples: Use syntax that is also compatible with csh
MFC after:	1 month
Sponsored by:	Klara Inc.
2023-02-27 17:37:28 +01:00
Kyle Evans
4148dffadd date: remove some ambiguity in tzdata references
The use of 'package' in this could be understood to mean a FreeBSD
package provided by pkg, rather than the fact that we use data provided
by IANA.  Re-word it to clearly identify `tzdata` as the IANA Time Zone
Database on first use, then drop subsequent uses of the word 'package'.

Reviewed by:	0mp, pauamma, philip
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D35966
2022-07-28 10:14:18 -05:00
Kyle Evans
9fcac31db4 date: attempt to more accurately describe year limitations with -v
The previous description was both incorrect and incomplete in its
description -- the 2038 limit doesn't apply on !i386 platforms, and
it didn't note that values above 100 are accepted and interpreted
differently.  Further, it didn't note that absolute years are accepted.

Reviewed by:	pauamma_gundo.com (manpages)
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D35360
2022-06-27 22:54:13 -05:00
Greg Lehey
8deef88628 Correct source markup. No change to output.
Reported by:	0mp@
2022-03-30 14:55:28 +11:00
Greg Lehey
8e4b069f45 Remove reference to kernel clock time zone.
Add references.

Reported by:	philip@
2022-03-30 14:42:14 +11:00
Greg Lehey
3c9f304b38 Describe modern time zone handling.
Reviewed by:	peterj@
MFC after:	2 weeks
2022-03-28 14:57:37 +11:00
Mateusz Piotrowski
c537bf9d59 date: Capitalize seconds string in synopses
This makes it consistent with other date(1) implementations. Also, it
feels more consistent since hours and minutes are already represented as
HH and MM respectively.

MFC after:	3 days
2021-11-03 14:09:36 +01:00
Mateusz Piotrowski
a12b16f48f date: Clean up synopses
MFC after:	3 days
2021-11-03 14:09:36 +01:00
Mateusz Piotrowski
00133d5c5e date.1: Fix some style issues and examples
- Use Cm instead of Ar or Sq for command modifiers of the -v flag.
- Remove unnecessary "Ar ..." from the synopsis. It's not clear what it
  was referring to.
- Add missing arguments to the -f and -v flags.
- Stylize the dot before "ss" with Cm in the default format in the -f
  flag description.
- Set LC_ALL=C in the last example so that the output format of
  date(1) always matches the specified format of the -f flag not matter
  the locale.
- List the -f flag as optional in all usage lines in the synopsis.

MFC after:	3 days
2021-11-03 14:09:18 +01:00
Ceri Davies
3e4946f0aa date.1: Remove mention of -d and -f flags
These flags were removed in 2019.

PR:		256631
Submitted by:	David Fiander <david@fiander.info>
MFC After:	3 days
2021-06-16 09:18:56 +00:00
Ed Maste
82178ae093 date.1: note possibly surprising behaviour of -j -f
PR:		248918
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2020-08-26 00:31:59 +00:00
Warner Losh
8b82def341 Restore the -n flag parsing, but ignore it.
Since D19668 was done, new users of the -n flag have surfaced. Parse
and ignore it on the command line until they can be updated.

Suggested by: rgrimes (in D19668).
2019-04-24 05:24:10 +00:00
Warner Losh
e77a99c1c1 Remove -n flag, fix setting date / time
r342139 bork setting the date. This fixes it by simply removing the -n
flag.

Differential Revision: https://reviews.freebsd.org/D19668
2019-03-21 06:47:23 +00:00
Warner Losh
ab87f59224 Remove the -d and -t flags from the man page
Remove -d and -t flags that were removed in r345050.

Noticed by: rgrimes@
2019-03-12 21:03:56 +00:00
Conrad Meyer
2c77ec5419 date(1): Add ISO 8601 formatting option
The new flag is named '-I'.  It is documented in the manual page and covered
by basic unit tests.
2018-08-04 21:54:30 +00:00
Conrad Meyer
3181398b92 Update other man pages to match leap second reality
Missed these in r334501; see justification there:

https://svnweb.freebsd.org/base?view=revision&revision=334501

Sponsored by:	Dell EMC Isilon
2018-06-01 22:37:59 +00:00
Benjamin Kaduk
f3aff7c91b Fix mandoc -Tlint warnings in bin/
Many style-level issues are still reported.

Submitted by:	Yuri Pankov <yuripv@gmx.com>
Reviewed by:	jilles (previous revision)
Differential Revision:	https://reviews.freebsd.org/D13334
2017-12-07 01:57:27 +00:00
Warner Losh
fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Xin LI
8b45db8ee2 date(1): Make -r behave like GNU's version when the option can not be
interpreted as a number, which checks the file's modification time and
use that as the date/time value.

This improves compatibility with GNU coreutils's version of time(1).

MFC after:	2 weeks
2015-05-07 20:54:38 +00:00
Jean-Sébastien Pédron
2fd66cdd22 date(1): Forgot to update manpage date in r264968
MFC after:	1 week
MFC with:	264968
2014-04-26 13:53:04 +00:00
Jean-Sébastien Pédron
b69ced8d8c date(1): Add "-R" flag to use RFC 2822 date and time output format
As stated in the man page, this is equivalent to use "%a, %d %b %Y %T %z"
as the output format while LC_TIME is set to the "C" locale.

This is compatible with date(1) from the GNU core utilities.
2014-04-26 13:05:56 +00:00
Brian Somers
5990bfb40b Explain that setting an absolute day value can fail and that the month should
usually be set first when using -v.

Adjust an example that sets the day to 30 before setting the month to 3 in
accordance with this approach as the example would always fail in February!

PR:		147354
MFC after:	2 weeks
2010-06-04 06:56:58 +00:00
Ed Schouten
0806dd9238 Remove stale references to utmp(5) and its corresponding filenames.
I removed utmp and its manpage, but not other manpages referring to it.
2010-01-21 17:25:12 +00:00
Remko Lodder
a1f6cb79d9 Correct the referenced securelevel document, it's now securelevel 7.
Pointed out by:	ru
2007-06-02 20:15:59 +00:00
Ruslan Ermilov
8af1113166 -mdoc sweep. 2005-11-17 12:15:23 +00:00
Tom Rhodes
b97fc83e47 Note which options are not part of the standards.
Xref locale(1) and bump document date.

Reviewed by:	keramida
No Objections:	-standards
2005-11-01 19:31:25 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov
6fca4c7c3f Add the new standard EXIT STATUS section where appropriate.
Sort standard sections in the (documented) preferred order.
2005-01-16 16:41:59 +00:00
Warner Losh
9ddb49cbe4 /*- or .\"- or #- to begin license clauses. 2005-01-10 08:39:26 +00:00
Ruslan Ermilov
6fa13ec06f Scheduled mdoc(7) sweep. 2005-01-09 19:54:23 +00:00
Yaroslav Tykhiy
d3e240cb45 Change the behaviour of `-v' so that, e.g., stepping a month back
on March 31 won't take you to March 2 or 3 (now the result will
be the last day of February.)

In general, now stepping by months from the last days of the current
month A will take you to the very last day of the target month B if
B is shorter than A.

The previous version would just step to March 31 and rely on mktime(3)
to correct the date.  Despite its simplicity, such way was counter-intuitive
to users and caused pain to shell script writers.

Noticed by:	Igor Timkin <ivt at gamma dot ru>
Approved by:	brian
MFC after:	2 weeks
2004-08-09 13:43:39 +00:00
Alfred Perlstein
8a0f7000e6 Give the most awesome example of how to parse the output of date
back into epoch time.  Everytime I'm asked to do this by someone I
have to spend about ten minutes recreating the same command line.
So record it under examples.
2004-07-17 00:26:31 +00:00
Ruslan Ermilov
1171aedcdf Deal with double whitespace. 2004-07-03 00:06:28 +00:00
Ruslan Ermilov
eccea571a7 Mechanically kill hard sentence breaks. 2004-07-02 21:04:19 +00:00
Ruslan Ermilov
b0cb98e238 DESCRIPTION was not updated for the new SYNOPSIS. 2004-05-16 21:33:48 +00:00
Brian Feldman
640c4d40fb Give date(1) a much better SYNOPSIS section which is useful as more than
decoration.  Further improvements are welcome, but at least this
is a separate of the various modes of operation date has, as well as
sectioning off the two deprecated options for settimeofday(tz) that
don't even apply to actual operation of date as such, anyway.
2004-04-06 22:03:38 +00:00
Mark Murray
6195fb4102 Remove clause 3 from the UCB licenses.
OK'ed by:	imp, core
2004-04-06 20:06:54 +00:00
David E. O'Brien
ab579b9e93 Note the Linux required format. 2004-01-06 19:01:34 +00:00
Ruslan Ermilov
522ccf3f35 mdoc(7) police: markup laundry. 2003-02-23 01:47:49 +00:00
David E. O'Brien
e0d2c36186 Add an example to help one manually set the date on one machine taking the out
put from another.
2003-02-18 23:12:55 +00:00
Tony Finch
35704b2f29 Fix some twelve hour clock braindamage. The range for hours is 0-23 not 1-12.
MFC After: 1 week
2002-10-03 14:11:29 +00:00
Tom Rhodes
63b3046fd5 s/CMOS/hardware as talked about on cvs-committers.
Suggested by:   sheldonh
Approved by:	bde
MFC after:	1 day
2002-04-16 14:28:47 +00:00
Tom Rhodes
dfbea8a5ee Little nit pick in date(1) manual page, tell users which clock date(1)
sets

PR:		35606
2002-04-15 18:05:14 +00:00
Ruslan Ermilov
c4d9468ea0 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
Dima Dorfman
7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Ruslan Ermilov
856ebd68ae Simplify, with the power of new mdoc(7). 2001-06-09 11:20:31 +00:00
Dima Dorfman
bfaf55a48d Make it clear that the -v option doesn't actually set the date.
PR:		24773
Approved by:	nik
2001-03-16 02:20:24 +00:00
Ben Smithurst
23c326d124 Document the restrictions on changing times in high securelevels.
PR:		23502
Submitted by:	Robert Boyd <rboyd@pokerspot.com>
2001-01-17 21:27:54 +00:00
Ruslan Ermilov
14b96e474c Prepare for mdoc(7)NG. 2000-12-19 15:30:26 +00:00
Ruslan Ermilov
12e720d78b Prepare for mdoc(7)NG. 2000-12-15 17:37:31 +00:00