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
Warner Losh
c608a9a591
Use strlcpy in place of strncpy + setting the last character NUL. To
...
be safe, memset the entire msg to '0'.
2006-08-20 06:31:24 +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
Mike Makonnen
662713f2a8
Rev. 1.32 moved a comment to the wrong line. The hack refered to
...
in the comment applies to a decision that needs to be made in relation
to the year 2000.
In fact, that statement probably should be changed to be
more generic (getting the year from the current time perhaps). Otherwise,
starting in 2069 two digit year conversions in date(1) will start assuming
1900 instead of 2000. hehe.
2004-03-04 15:46:14 +00:00
David E. O'Brien
ab579b9e93
Note the Linux required format.
2004-01-06 19:01:34 +00:00
Diomidis Spinellis
4566e7a433
Check for write errors; report and exit with error value.
2003-10-04 07:16:40 +00:00
Mark Murray
eac4bdcca4
Get this area compiling with the highest WARNS= that it works with.
...
Obsolete WFORMAT= junk also removed where possible.
OK'ed by: obrien
Tested on: sparc64, alpha, i386
2003-06-13 07:04:02 +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
Philippe Charnier
e869e50704
Enclose sccsid according to style(9).
...
udp/timed -> timed/udp
2003-02-05 12:56:40 +00:00
Mark Murray
4e3b1d65e6
Staticify for lint.
2002-10-18 14:48:48 +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
David E. O'Brien
5eb43ac2f7
Consistently use __FBSDID
2002-06-30 05:13:54 +00:00
Giorgos Keramidas
e02ef09616
Use socklen_t for the length of a socket structure instead of `int'.
...
Reviewed by: mike
2002-06-09 04:18:45 +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
Mark Murray
9afa09cd0e
Fix warnings inspired by lint, a commercial lint and WARNS=4.
2002-02-22 20:51:00 +00:00
Kris Kennaway
afe781faa2
Lock down with WFORMAT=1 except those directories with unfixed warnings.
...
Tested on i386 and alpha.
2002-02-04 02:49:19 +00:00
Warner Losh
f9bcb0beb5
o __P has been reoved
...
o Old-style K&R declarations have been converted to new C89 style
o register has been removed
o prototype for main() has been removed (gcc3 makes it an error)
o int main(int argc, char *argv[]) is the preferred main definition.
o Attempt to not break style(9) conformance for declarations more than
they already are.
Approved by: arch@, new style(9)
2002-02-02 06:24:13 +00:00
David E. O'Brien
a748290789
Default to WARNS=2. Binary builds that cannot handle this must explicitly
...
set WARNS=0.
Reviewed by: mike
2001-12-04 01:57:47 +00:00
Matthew Dillon
cd9c425794
Remove assumption that time_t is an int
...
MFC after: 1 day
2001-10-28 02:28:04 +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
1adbddec6e
Add -j to the usage string.
...
PR: 27986
Submitted by: Cyrille Lefevre <clefevre@redirect.to>
2001-06-09 06:14:05 +00:00
Ruslan Ermilov
10d865720b
Fix an off-by-hour bug when crossing Daylight Saving Time boundary.
...
PR: bin/27399
Submitted by: "Crist J. Clark" <crist.clark@globalstar.com>
MFC after: 3 days
2001-05-17 15:20:15 +00:00
Bill Fenner
57c6e666cc
Fix error reporting of delayed send errors.
2001-03-26 16:18:01 +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
Brian Somers
6e4cd31d99
Exit if malloc() returns NULL
...
Submitted by: Chris Faulhaber <jedgar@fxp.org>
2000-12-01 09:59:40 +00:00
Ruslan Ermilov
be8b149795
mdoc(7) police: use the new features of the Nm macro.
2000-11-20 11:39:41 +00:00
Warner Losh
2c15efcfb5
Don't explicitly declare optarg and optind. These are declared in
...
unistd.h, which is already included.
2000-08-16 05:14:49 +00:00
John W. De Boskey
eba53b965a
Try to clean the manpage up according to the mail from Sheldon
...
in committers (Message-Id: <72836.964344168@axl.ops.uunet.co.za>).
Also cleaned up a .Pq macro which was causing problems previous
to the original update I made.
Reviewed by: sheldonh
Approved by: jkh
2000-07-28 02:51:43 +00:00
John W. De Boskey
b4a3a03827
Expand the -r option to support hex. Though undocumented, the -r
...
option already supported octal. Add a comment to the -r option
in the man page so it's a bit more specific.
Discrepancy brought to my attention by: sasdrq@unx.sas.com
Approved by: jkh
2000-07-22 22:08:39 +00:00
Sheldon Hearn
888d5fad11
Fix one grammar problem which crept in from rev 1.40 to rev 1.42, and
...
one mdoc problem from rev 1.40 (unnecessarily populated Nm macro).
2000-07-18 12:02:15 +00:00
Mark Ovens
e7b7b6e4c4
Re-worded the description of the -r option
...
PR: 18792
Submitted by: Bob Johnson <bobj@atlantic.net>
Approved by: Alexander Langer <alex@freebsd.org>
2000-07-15 14:55:54 +00:00
Alexander Langer
68dee1e331
Now, the mdoc fixes, such as:
...
* remove hard sentence breaks
* use of Fl with Ar if argument available
* Dq -> Sq where better
* Ql -> Dq and Ql -> Fa where better
* include sections to Xr macro
* It Ar .ss -> It Ar ss
2000-07-14 15:49:36 +00:00
Alexander Langer
60ad2ab574
As per request by sheldonh and others on IRC, seperate language and mdoc
...
fixes (very important in this case). Version 1.40 should be discarded.
This version includes the language diffs. To receive them, use
cvs diff [-u] -r 1.39 -r 1.41
2000-07-14 15:38:38 +00:00
Alexander Langer
8135b667d1
Fix several language, style and mdoc improvements (such as correct
...
usage of .Xr and removal of hard sentence breaks).
PR: 18880
Submitted by: Christian Weisgerber <naddy@unix-ag.uni-kl.de>
Obtained from: OpenBSD (in parts)
2000-07-14 14:18:04 +00:00
Mike Pritchard
af63ed3ce0
Grumble. The previous commit still had the wrong date in the
...
example. Oct 29 0:30 +3 hours is still Oct 29, no matter what the
DST setting is, and not Oct 30..
2000-06-28 09:20:06 +00:00
Mike Pritchard
861c69ca3e
Typo fix.
...
PR: docs/19554
Submitted by: Kazuo Horikawa <horikawa@psinet.com>
2000-06-28 09:13:32 +00:00
Brian Somers
714c609be5
Mention the timezone where appropriate (for the -v option).
...
correct one of the -v options.
2000-06-22 10:02:33 +00:00
Brian Somers
7ecff35b0d
Propogate the ``call mktime'' flag from adjwday() down to adjday().
...
Submitted by: Christian Weisgerber <naddy@mips.inka.de>
2000-05-23 23:58:18 +00:00
Daniel Baker
d5dc63cc0a
Correct confusion and differentiate appropriately between GMT and UTC when
...
date is launched with the "u" argument. It now operates in the documented
manner.
Fix typo in date man page.
Submitted by: David McNett <nugget@slacker.com>
2000-05-19 18:02:25 +00:00
Brian Somers
9263db41f6
Change -v so that variences in units of days or less are sensitive to
...
DST. Explain in more detail what date -v does when mixed with DST.
Previous code suggested broken by: wollman
2000-04-12 13:35:17 +00:00
Brian Somers
a625bfec63
Always give mktime a timeval with tm_isdst set to -1, otherwise
...
things get a bit out-of-phase when we step backwards 1 hour from
between 0:00 and 1:00 on the first of the month following the
transition into Summer time. This is probably actually a bug
in mktime().
PR: 10963
If mktime() fails and 68 < year < 138, assume that the reason is
because of Summer time and adjust up or down according to our
adjusting context by one hour. This assumes that all DSTs are
multiples of 1 hour.
PR: 6223, 17750
2000-04-05 01:59:36 +00:00
Sheldon Hearn
8d230e25ae
Correct confusing description of the -r option.
...
PR: 17250
Submitted by: cjclark@home.com (Crist J. Clark)
2000-03-07 20:54:17 +00:00
Alfred Perlstein
3b006d8ebd
Re-add "May" to the list of dates supported.
...
Approved by: jkh
2000-02-18 23:41:45 +00:00
Brian Somers
94a64a491a
Fix various mandoc bugs
2000-01-12 00:29:16 +00:00
Sheldon Hearn
a82111c306
Back out previous commit and replace with a cleaner solution adapted
...
from the source attributed below. In particular, this removes a goto
inside a switch and replaces those horrendous ATOI macros with
something acceptable.
More clean-ups to come.
PR: bin/14151
Reported by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
Obtained from: NetBSD
1999-12-29 16:50:08 +00:00
Sheldon Hearn
646e0924a1
Allow the year to be specified with an optional century.
...
PR: 14472
Reported by: j_guojun@lbl.gov (Jin Guojun)
1999-11-10 13:34:39 +00:00
Peter Wemm
2a4562393f
$Id$ -> $FreeBSD$
1999-08-27 23:15:48 +00:00
Jordan K. Hubbard
9efde83904
Remove obsolete BUGS section which describes something which stopped
...
being relevant when we ripped out the BSD/VAX code.
Submitted by: Guy Harris <gharris@flashcom.net>
1999-08-25 14:38:58 +00:00
Martin Cracauer
d430c0c167
Don't continue if parsing failed when -f is in use. Exit with nonzero value.
1999-06-25 09:04:48 +00:00
John-Mark Gurney
3bc1b1bb27
the month and three days are up for -hackers and the 24hrs for -committers.
...
add a -j flag that tells date not to try to set the date. This allows you
to use date as a userland interface to strptime.
example:
TZ=GMT date -j -f "%a, %d %b %Y %T %Z" "Sun, 08 Nov 1998 02:22:20 GMT" +%s
which is the standard format for Last-modified headers in HTTP requests.
only one to respond: eivind
1999-05-14 00:28:41 +00:00
Kris Kennaway
46be34b902
Various spelling/formatting changes.
...
Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
1999-05-08 10:22:15 +00:00
Warner Losh
426e9c1dcc
First set of fixes to keep egcs happy. These include {} around single
...
statement if blocks[*] when the else could be ambiguous, not defaulting
to int type and removal of some unused variables.
[*] This is explicitly allowed by style(9) when the single statement
spans more than one line.
Reviewed by: obrien, chuckr
1999-04-25 21:13:34 +00:00
Brian Somers
269dfbee64
Support seconds with -v.
...
PR: 6308
Submitted by: Max Euston <meuston@jmrodgers.com>
1999-03-09 09:38:54 +00:00
Daniel O'Callaghan
fd5a0a9b4b
Example "19%y" changed to "%Y" to discourage poor usage.
1999-01-13 07:01:07 +00:00
Bruce Evans
d3f062f04e
Don't put compiler warning flags in leaf Makefiles.
1998-12-07 12:50:48 +00:00
Alexander Langer
f97fe12243
Added missing #include <string.h>
1998-10-03 16:29:59 +00:00
Poul-Henning Kamp
84717b42e8
.Sh ENVIRONMENT VARIABLES -> .Sh ENVIRONMENT
...
PR: 6599
Reviewed by: phk
Submitted by: Josh Gilliam <josh@quick.net>
1998-05-13 07:57:49 +00:00
Philippe Charnier
574d120677
Restore Lite-2 sccsid. Restore include of sys/param.h.
1998-05-13 07:31:42 +00:00
Philippe Charnier
cbf6f7d358
Correct use of .Nm and other cosmetics. Add rcsid. Remove unused #inc.
1998-05-06 06:51:42 +00:00
Robert Nordier
336f22af33
Spelling/typo fixes: (preceeded, friday).
1998-04-20 21:06:38 +00:00
John Birrell
c1e8822ae4
Cast a size_t to a long to avoid a gcc warning.
1998-01-25 08:59:08 +00:00
Brian Somers
c39934ea32
Add (BSD) copyright headers.
1997-12-21 12:11:13 +00:00
Brian Somers
ad1c694bdc
Put [+format] at the end of the usage message.
...
Make `date -?' output (pretty much) the same as
the man page
PR: 5269
1997-12-11 02:38:56 +00:00
Wolfram Schneider
f50f7e1e32
Change example from US to international standard date notation.
1997-10-03 18:09:17 +00:00
Daniel O'Callaghan
c5c1c13516
Back out suppress '\n' mod.
1997-10-03 12:54:30 +00:00
Daniel O'Callaghan
34de7199ea
Add the '-s' flag to the usage string.
1997-10-01 05:44:35 +00:00
Daniel O'Callaghan
70a53cd743
Add the ability to supress the '\n' at the end of the date printed.
1997-10-01 05:24:08 +00:00
Joerg Wunsch
adb7f7bca7
Fix the broken `date HHMM.SS' handling.
...
PR: bin/4661
Submitted by: blank@sliphost37.uni-trier.de (Sascha Blank)
1997-09-30 20:06:15 +00:00
Wolfram Schneider
f6b31571f6
spelling corrections.
...
PR: docs/4450
Submitted by: josh@quick.net
1997-09-13 16:01:53 +00:00
John-Mark Gurney
81cd6abb0a
fix misspelling
...
Submitted-by: Josh Gilliam
Closes PR:4425
1997-08-30 11:06:35 +00:00
Brian Somers
7fedb877a4
Hint at how to use TZ.
...
Submitted by: grog@lemis.com
1997-08-18 20:27:17 +00:00
Brian Somers
233d16da02
Remove forgotten debug statement.
1997-08-10 16:37:33 +00:00
Brian Somers
86a3e2a13a
Add "-f fmt date" for specification of the
...
date using strptime(3).
Suggested by: Michael Smith <msmith@atrad.adelaide.edu.au>
Change mm & dd to MM & DD so that they don't
clash with the month.
1997-08-10 16:36:59 +00:00
Brian Somers
698f86e401
Change [-DMHW [+|-]val] to [-v [+|-]val[ymwdHM]]
...
Support Hours & Minutes
Add -Wall to Makefile
1997-08-09 22:34:06 +00:00
Brian Somers
7ca215a690
Add [-DWMY] flags for date adjustment.
...
Discussed with: freebsd-hackers
1997-08-04 03:37:07 +00:00
Philippe Charnier
749d4bb649
Cosmetic change in usage string.
1997-06-06 06:40:06 +00:00
Philippe Charnier
4600c7fb36
Off by 1 adjustment.
1997-06-02 06:27:00 +00:00
Daniel O'Callaghan
ec50d24e74
Fix typo in comment; Document in an example that years beyond 1999
...
are handled; fix typo in same example.
1997-04-16 05:59:21 +00:00
Warner Losh
93ef08af3e
compare return value from getopt against -1 rather than EOF, per the final
...
posix standard on the topic.
1997-03-28 15:24:41 +00:00
Guido van Rooij
e298ae5d12
Fix buffer overflow
1997-03-10 19:52:12 +00:00
Peter Wemm
b97fa2ef50
Revert $FreeBSD$ to $Id$
1997-02-22 14:13:04 +00:00