summaryrefslogtreecommitdiff
path: root/bin/date
AgeCommit message (Collapse)Author
2023-05-31date(1): sync two [[[[[CC]yy]mm]dd]HH]MM[.SS] instancesuwe
The markup was the same (modulo Li vs Cm for the dot before the seconds), but use the same source markup grouping/layout in both to make this fact more obvious.
2023-05-31Add -R to usagekim
2023-05-31date(1): minor markup fixesuwe
2023-05-31Add -R option for displaying time in RFC 5322 format, similar to GNU date.kim
2022-10-22Add -f option to set the time. From FreeBSD.christos
2022-05-10date(1): Use .Dl for one-liners. Same output is generated.uwe
2022-05-10date(1): Fix the offset in previous.uwe
2022-05-10date(1): add example for how to get seconds since the Epoch outputwiz
2021-05-26tool changeschristos
2018-01-27Remove trailing whitespace and Tn macro.wiz
2018-01-25sync with tzcode-2018cchristos
2017-07-03Remove workaround for ancient HTML generation code.wiz
2017-01-03The range of the SS field is [0,60]abhinav
From the POSIX time.h man page: "The formal definition of UTC does not permit double leap seconds, so all mention of double leap seconds has been removed, and the range shortened from the former [0,61] seconds seen in previous versions of POSIX."
2016-08-11Document the version date first appeared.sevan
Bump date.
2014-09-01Provide real error messages.dholland
Inspired by PR 49169 from David H. Gutteridge, but a much broader patch :-)
2012-04-06- fix timed(8) references;wiz
- fix capitalization; - add reference to environ(7) in `SEE ALSO' section, as it is mentioned in the text. From patch by Bug Hunting.
2011-08-27Annotate dead functionsjoerg
2011-08-14Document non-literal formatschristos
2011-01-29revert the revert and fix the code properly.christos
2011-01-28roll back to 20101210 -- the current version just hung if one trieddrochner
to set the date
2010-12-12check return value of localtime.christos
2010-12-11- check return of strtollchristos
- misc cleanup
2010-10-03Simplify by using setenv() instead of putenv().gson
2010-10-02putenv() no longer accepts a const stringgson
2010-05-29Don't blow up on date +''. Patch from Robert Elz in followup to PR 39392.dholland
2010-02-04Remove trailing whitespace.wiz
2010-02-04For the -d option, refer to parsedate(3) for examples.reed
2009-01-30Show that "seconds" is the expected argument for -r.reed
(I didn't bump the manual page date for this minor change. If I should let me know.)
2008-07-20Remove the \n and tabs from the __COPYRIGHT() strings.lukem
2008-02-24Use strtoll rather than strtol to read the -r argument, so it will workdholland
for wider time_t. Also mark a timed-related y2038 lossage for whenever someone figures out the best way to shoot timed.
2007-02-04 * Prevent out-of-bounds read tsptype if a packet withcbiere
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-04Use size_t not int for strlen().cbiere
2006-11-26Drop trailing whitespace.wiz
2006-11-20getdate -> parsedatechristos
2006-11-17getdate is in libutil.christos
2006-11-15no names in params.christos
2006-11-15fix build with objdirschristos
2006-11-15Add -d option, similar to gnu date.christos
2006-11-15Add -j flag to not actually change the clock, just parse the date givenjdarrow
(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-10-07PR/28450: David H. Gutteridge: date(1) does not validate its input andelad
accepts and processes impossible dates Patch applied, thanks!
2006-08-17don't include program name when calling err()jnemeth
2006-07-23PR/34055: Kevin Massey: Date uses a fixed 1K buffer for strftimechristos
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-06-14Adapt date(1), the netsettime function, to new return value from socket(2)ginsbach
when the address family is unsupported.
2005-07-22More minor cleanup:peter
- remove unnecessary prototype for main() - use symbolic exit code - KNF & wrap a long line
2005-07-22Minor code cleanup:hubertf
* 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-06-26sprinkle a little const, and now everything compiles with WARNS=3christos
2005-05-15Set (and report) the new time (not the old one).dsl
I broke it in rev 1.38, someone has finally noticed....
2005-04-18Add a '-a' option to set the time using adjtime(2) instead of settimeofday(2).dsl
Fix usage so that the options which apply to dat/time setting are on the correct line.
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22249, verified by myself.
2003-08-04As discusses a little while back on tech-userlevel:jschauma
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.