Commit Graph

111 Commits

Author SHA1 Message Date
wiz
c27272249b - fix timed(8) references;
- fix capitalization;
- add reference to environ(7) in `SEE ALSO' section, as it is
  mentioned in the text.

From patch by Bug Hunting.
2012-04-06 11:36:56 +00:00
joerg
aa6d7bb577 Annotate dead functions 2011-08-27 12:55:09 +00:00
christos
fe8677c354 Document non-literal formats 2011-08-14 10:53:16 +00:00
christos
60c10f9b2e revert the revert and fix the code properly. 2011-01-29 02:16:52 +00:00
drochner
da4141bdd5 roll back to 20101210 -- the current version just hung if one tried
to set the date
2011-01-28 20:23:38 +00:00
christos
187cac5a8d check return value of localtime. 2010-12-12 17:30:23 +00:00
christos
5b87ff3a6f - check return of strtoll
- misc cleanup
2010-12-11 16:57:51 +00:00
gson
10d3698a9d Simplify by using setenv() instead of putenv(). 2010-10-03 08:21:27 +00:00
gson
5e313b3092 putenv() no longer accepts a const string 2010-10-02 08:26:09 +00:00
dholland
a617f5fd5a Don't blow up on date +''. Patch from Robert Elz in followup to PR 39392. 2010-05-29 20:41:58 +00:00
wiz
e3da56d760 Remove trailing whitespace. 2010-02-04 22:56:11 +00:00
reed
c0410f482f For the -d option, refer to parsedate(3) for examples. 2010-02-04 19:25:22 +00:00
reed
81a4d4f0b0 Show that "seconds" is the expected argument for -r.
(I didn't bump the manual page date for this minor change. If I
should let me know.)
2009-01-30 13:16:16 +00:00
lukem
2fe2731d3f Remove the \n and tabs from the __COPYRIGHT() strings. 2008-07-20 00:52:39 +00:00
dholland
6dc3dcbc38 Use strtoll rather than strtol to read the -r argument, so it will work
for wider time_t. Also mark a timed-related y2038 lossage for whenever
someone figures out the best way to shoot timed.
2008-02-24 04:49:45 +00:00
cbiere
cd788d025e * Prevent out-of-bounds read tsptype if a packet with
an unknown msg_type is received.
 * Check the received packet size.
 * Use strncpy() instead of strlcpy() so that we don't
   send gibberish from the stack.
 * No need to bind().
 * htons()/htonl() use uint16_t/uint32_t not u_short/u_long.
2007-02-04 22:21:53 +00:00
cbiere
1b1ee3c7ce Use size_t not int for strlen(). 2007-02-04 22:11:13 +00:00
wiz
1730a98675 Drop trailing whitespace. 2006-11-26 16:40:44 +00:00
christos
ab56b9a702 getdate -> parsedate 2006-11-20 20:33:33 +00:00
christos
c8226bf504 getdate is in libutil. 2006-11-17 22:11:28 +00:00
christos
583dd15916 no names in params. 2006-11-15 17:00:09 +00:00
christos
8ddd07b65e fix build with objdirs 2006-11-15 16:59:52 +00:00
christos
aa62ece776 Add -d option, similar to gnu date. 2006-11-15 16:55:18 +00:00
jdarrow
5d27a9d665 Add -j flag to not actually change the clock, just parse the date given
(if any) and then display it in the format given.  Matches similar -j
flag functionality in FreeBSD/OpenBSD.

Change requested by George Georgalis on netbsd-users.

While I'm here, disambiguate the letters in the date string, by using
the same option letters as used by strftime(3).
2006-11-15 03:10:01 +00:00
elad
9b5118f13d PR/28450: David H. Gutteridge: date(1) does not validate its input and
accepts and processes impossible dates

Patch applied, thanks!
2006-10-07 09:34:46 +00:00
jnemeth
a0cb2a839d don't include program name when calling err() 2006-08-17 10:03:53 +00:00
christos
8a487b533d PR/34055: Kevin Massey: Date uses a fixed 1K buffer for strftime
but does not check when strftime fails because the buffer is too small.
Our implementation of strftime does not NUL terminat the buffer
on failure (it does not have to; the results are undefined), so
garbage gets printed. Use a dynamically allocated buffer instead.
2006-07-23 20:39:10 +00:00
ginsbach
84b3179a34 Adapt date(1), the netsettime function, to new return value from socket(2)
when the address family is unsupported.
2006-06-14 16:35:16 +00:00
peter
fa141339e0 More minor cleanup:
- remove unnecessary prototype for main()
- use symbolic exit code
- KNF & wrap a long line
2005-07-22 14:27:08 +00:00
hubertf
15bc25dc45 Minor code cleanup:
* remove unneeded cast
 * use err() instead of perror() + exit()
 * use symbolic exit code

Patch contributed by Liam J. Foy <liamfoy@sepulcrum.org> in private mail.
2005-07-22 11:06:24 +00:00
christos
6310b59691 sprinkle a little const, and now everything compiles with WARNS=3 2005-06-26 19:10:48 +00:00
dsl
d85801918d Set (and report) the new time (not the old one).
I broke it in rev 1.38, someone has finally noticed....
2005-05-15 18:39:39 +00:00
dsl
a7151c0abc Add a '-a' option to set the time using adjtime(2) instead of settimeofday(2).
Fix usage so that the options which apply to dat/time setting are on the
correct line.
2005-04-18 06:53:35 +00:00
agc
b5b2954259 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22249, verified by myself.
2003-08-07 09:05:01 +00:00
jschauma
458ed23412 As discusses a little while back on tech-userlevel:
If stdout is a tty, use vis(3) to print any filenames to prevent garbage
from being printed if the filename contains control- or other non-printable
characters.

While here, sprinkle some EXIT_FAILURE and NOTREACHED where appropriate.
2003-08-04 22:31:21 +00:00
lukem
f994b2252e doc2html works here now, so remove NOHTML 2003-07-18 02:18:57 +00:00
itojun
032ed69f9a strlcpy 2003-07-12 13:23:55 +00:00
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
wiz
14dfaa4b03 New policy: New sentences start on a new line.
Patches by Robert Elz <kre at munnari oz au>, with minimal changes by me.
2002-09-25 15:18:36 +00:00
mycroft
826e316675 select() -> poll() 2002-09-21 18:15:57 +00:00
ross
dc5571b22e Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:21:55 +00:00
wiz
22f1ac50a6 Sort sections. 2001-12-20 20:04:19 +00:00
wiz
3ebcdc5e43 Whitespace nits. 2001-12-20 19:31:48 +00:00
lukem
cc76cf8530 fix WARNS=2 2001-11-03 13:08:16 +00:00
wiz
bb88f10d3d Use setprogname. Patch by Petri Koistinen. 2001-09-16 13:35:52 +00:00
wiz
a824cb6a27 ANSIfication and KNF fixes by Petri Koistinen in bin/13691. 2001-09-13 10:06:40 +00:00
gmcgarry
bad387a59a Use socklen_t; for compilers with strict type checking. 2001-07-08 05:26:03 +00:00
gmcgarry
91825c128d setthetime() is prototyped static; make it so. 2001-07-08 05:24:50 +00:00
lukem
17c6a1082e doc2hmtl is broken for recursive Oo ... Oc at this time 2001-07-03 21:50:13 +00:00
hubertf
bb6b8354d9 xref settimeofday(2) 2001-03-09 15:16:49 +00:00