aboutsummaryrefslogtreecommitdiff
path: root/bin/date
Commit message (Collapse)AuthorAgeFilesLines
* MFC:Christian Brueffer2005-02-081-2/+2
| | | | | | | | | Scheduled mdoc(7) sweep. Original revisions by: ru Notes: svn path=/stable/5/; revision=141517
* Change the behaviour of `-v' so that, e.g., stepping a month backYaroslav Tykhiy2004-08-092-1/+30
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=133381
* Give the most awesome example of how to parse the output of dateAlfred Perlstein2004-07-171-0/+8
| | | | | | | | | 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. Notes: svn path=/head/; revision=132272
* Deal with double whitespace.Ruslan Ermilov2004-07-031-3/+5
| | | | Notes: svn path=/head/; revision=131505
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-1/+1
| | | | Notes: svn path=/head/; revision=131484
* DESCRIPTION was not updated for the new SYNOPSIS.Ruslan Ermilov2004-05-161-6/+7
| | | | Notes: svn path=/head/; revision=129294
* Give date(1) a much better SYNOPSIS section which is useful as more thanBrian Feldman2004-04-061-9/+13
| | | | | | | | | | 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. Notes: svn path=/head/; revision=127964
* Remove clause 3 from the UCB licenses.Mark Murray2004-04-064-16/+0
| | | | | | | OK'ed by: imp, core Notes: svn path=/head/; revision=127958
* Rev. 1.32 moved a comment to the wrong line. The hack refered toMike Makonnen2004-03-041-2/+2
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=126605
* Note the Linux required format.David E. O'Brien2004-01-061-0/+1
| | | | Notes: svn path=/head/; revision=124185
* Check for write errors; report and exit with error value.Diomidis Spinellis2003-10-041-0/+2
| | | | Notes: svn path=/head/; revision=120729
* Get this area compiling with the highest WARNS= that it works with.Mark Murray2003-06-131-2/+0
| | | | | | | | | | Obsolete WFORMAT= junk also removed where possible. OK'ed by: obrien Tested on: sparc64, alpha, i386 Notes: svn path=/head/; revision=116282
* mdoc(7) police: markup laundry.Ruslan Ermilov2003-02-231-31/+22
| | | | Notes: svn path=/head/; revision=111285
* Add an example to help one manually set the date on one machine taking the outDavid E. O'Brien2003-02-181-0/+5
| | | | | | | put from another. Notes: svn path=/head/; revision=111104
* Enclose sccsid according to style(9).Philippe Charnier2003-02-052-5/+7
| | | | | | | udp/timed -> timed/udp Notes: svn path=/head/; revision=110390
* Staticify for lint.Mark Murray2002-10-181-2/+2
| | | | Notes: svn path=/head/; revision=105396
* Fix some twelve hour clock braindamage. The range for hours is 0-23 not 1-12.Tony Finch2002-10-031-1/+1
| | | | | | | MFC After: 1 week Notes: svn path=/head/; revision=104410
* Consistently use __FBSDIDDavid E. O'Brien2002-06-303-9/+6
| | | | Notes: svn path=/head/; revision=99109
* Use socklen_t for the length of a socket structure instead of `int'.Giorgos Keramidas2002-06-091-1/+2
| | | | | | | Reviewed by: mike Notes: svn path=/head/; revision=98062
* s/CMOS/hardware as talked about on cvs-committers.Tom Rhodes2002-04-161-1/+1
| | | | | | | | | Suggested by: sheldonh Approved by: bde MFC after: 1 day Notes: svn path=/head/; revision=94850
* Little nit pick in date(1) manual page, tell users which clock date(1)Tom Rhodes2002-04-151-0/+6
| | | | | | | | | sets PR: 35606 Notes: svn path=/head/; revision=94787
* Fix warnings inspired by lint, a commercial lint and WARNS=4.Mark Murray2002-02-223-20/+21
| | | | Notes: svn path=/head/; revision=91079
* Lock down with WFORMAT=1 except those directories with unfixed warnings.Kris Kennaway2002-02-041-0/+1
| | | | | | | Tested on i386 and alpha. Notes: svn path=/head/; revision=90166
* o __P has been reovedWarner Losh2002-02-023-17/+11
| | | | | | | | | | | | | | 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) Notes: svn path=/head/; revision=90108
* Default to WARNS=2. Binary builds that cannot handle this must explicitlyDavid E. O'Brien2001-12-041-0/+1
| | | | | | | | | set WARNS=0. Reviewed by: mike Notes: svn path=/head/; revision=87323
* Remove assumption that time_t is an intMatthew Dillon2001-10-281-1/+3
| | | | | | | MFC after: 1 day Notes: svn path=/head/; revision=85615
* mdoc(7) police:Ruslan Ermilov2001-08-071-15/+11
| | | | | | | | | | 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. Notes: svn path=/head/; revision=81251
* Remove whitespace at EOL.Dima Dorfman2001-07-151-3/+3
| | | | Notes: svn path=/head/; revision=79754
* Simplify, with the power of new mdoc(7).Ruslan Ermilov2001-06-091-9/+3
| | | | Notes: svn path=/head/; revision=77940
* Add -j to the usage string.Dima Dorfman2001-06-091-1/+1
| | | | | | | | PR: 27986 Submitted by: Cyrille Lefevre <clefevre@redirect.to> Notes: svn path=/head/; revision=77934
* Fix an off-by-hour bug when crossing Daylight Saving Time boundary.Ruslan Ermilov2001-05-171-0/+3
| | | | | | | | | PR: bin/27399 Submitted by: "Crist J. Clark" <crist.clark@globalstar.com> MFC after: 3 days Notes: svn path=/head/; revision=76749
* Fix error reporting of delayed send errors.Bill Fenner2001-03-261-1/+1
| | | | Notes: svn path=/head/; revision=74819
* Make it clear that the -v option doesn't actually set the date.Dima Dorfman2001-03-161-2/+3
| | | | | | | | PR: 24773 Approved by: nik Notes: svn path=/head/; revision=74320
* Document the restrictions on changing times in high securelevels.Ben Smithurst2001-01-171-1/+5
| | | | | | | | PR: 23502 Submitted by: Robert Boyd <rboyd@pokerspot.com> Notes: svn path=/head/; revision=71195
* Prepare for mdoc(7)NG.Ruslan Ermilov2000-12-191-1/+1
| | | | Notes: svn path=/head/; revision=70190
* Prepare for mdoc(7)NG.Ruslan Ermilov2000-12-151-16/+30
| | | | Notes: svn path=/head/; revision=70056
* Exit if malloc() returns NULLBrian Somers2000-12-011-1/+3
| | | | | | | Submitted by: Chris Faulhaber <jedgar@fxp.org> Notes: svn path=/head/; revision=69457
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-201-2/+2
| | | | Notes: svn path=/head/; revision=68935
* Don't explicitly declare optarg and optind. These are declared inWarner Losh2000-08-161-2/+0
| | | | | | | unistd.h, which is already included. Notes: svn path=/head/; revision=64692
* Try to clean the manpage up according to the mail from SheldonJohn W. De Boskey2000-07-281-5/+6
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=63950
* Expand the -r option to support hex. Though undocumented, the -rJohn W. De Boskey2000-07-222-2/+3
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=63761
* Fix one grammar problem which crept in from rev 1.40 to rev 1.42, andSheldon Hearn2000-07-181-2/+2
| | | | | | | one mdoc problem from rev 1.40 (unnecessarily populated Nm macro). Notes: svn path=/head/; revision=63417
* Re-worded the description of the -r optionMark Ovens2000-07-151-2/+4
| | | | | | | | | PR: 18792 Submitted by: Bob Johnson <bobj@atlantic.net> Approved by: Alexander Langer <alex@freebsd.org> Notes: svn path=/head/; revision=63224
* Now, the mdoc fixes, such as:Alexander Langer2000-07-141-22/+28
| | | | | | | | | | | | * 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 Notes: svn path=/head/; revision=63155
* As per request by sheldonh and others on IRC, seperate language and mdocAlexander Langer2000-07-141-32/+28
| | | | | | | | | | 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 Notes: svn path=/head/; revision=63153
* Fix several language, style and mdoc improvements (such as correctAlexander Langer2000-07-141-57/+60
| | | | | | | | | | | 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) Notes: svn path=/head/; revision=63150
* Grumble. The previous commit still had the wrong date in theMike Pritchard2000-06-281-1/+1
| | | | | | | | example. Oct 29 0:30 +3 hours is still Oct 29, no matter what the DST setting is, and not Oct 30.. Notes: svn path=/head/; revision=62208
* Typo fix.Mike Pritchard2000-06-281-1/+1
| | | | | | | | PR: docs/19554 Submitted by: Kazuo Horikawa <horikawa@psinet.com> Notes: svn path=/head/; revision=62207
* Mention the timezone where appropriate (for the -v option).Brian Somers2000-06-221-3/+3
| | | | | | | correct one of the -v options. Notes: svn path=/head/; revision=61949
* Propogate the ``call mktime'' flag from adjwday() down to adjday().Brian Somers2000-05-231-4/+4
| | | | | | | Submitted by: Christian Weisgerber <naddy@mips.inka.de> Notes: svn path=/head/; revision=60836