summaryrefslogtreecommitdiffstats
path: root/bin/date (follow)
Commit message (Collapse)AuthorAgeFilesLines
* date(1): remove -d dst and -t minutes_westcheloha2019-08-082-44/+7
| | | | | | | | Part of the kernel timezone removal effort. With input from deraadt@ and tedu@. "burn it!" mpi@, ok tedu@ deraadt@
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-2/+2
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* -p got changed to -f;jmc2019-01-221-3/+3
|
* add a -f pformat flag to parse the given time with strptime.tedu2019-01-212-66/+85
|
* - add an example to date(1) showing how to convert between timezonesjmc2018-10-171-4/+12
| | | | | | | | | - update the description of TZ in date(1) - mention some relevant info to avoid sending the reader to another page and, when they have to refer to another page, send them to tzset(3) rather than environ(7) - update the timezone name used in environ(7), as advised by millert ok millert
* The time-setting codepath can use pledge "settime" which was added forderaadt2018-04-251-2/+5
| | | | | | ntpd, but apparently date was never revisited. "wpath" is for wtmp logging. "rpath" for the case where -z argument isn't in the standard timezone dir. discussed with tb and guenther
* atoll -> strtonumcheloha2018-02-131-2/+5
| | | | ok millert@ tb@
* As we only use the .tv_sec field, simplify gettimeofday(2) -> time(3).cheloha2017-12-231-8/+6
| | | | | | | | While here, use err(3) instead of errx(3) if adjtime(2) fails. Discussed/tweaked with/by tb@ and jca@. ok tb@ jca@
* remove redundant variable declarations in Makefiles, since those areespie2017-07-091-2/+1
| | | | | | the default. okay millert@
* Delete useless setlocale(3) in src/bin/.schwarze2016-10-191-7/+4
| | | | | | Minor cleanup while here: return from main, static void __dead usage, etc. Based on a patch from Jan Stary <hans at stare dot cz>. Feedback and OK tb@, OK millert@.
* Remove mention of "remote time" in description for the -a flag.jca2016-09-121-3/+3
| | | | | timed(8) support for date(1) was removed years ago. ok millert@ deraadt@
* Change all tame callers to namechange to pledge(2).deraadt2015-10-091-3/+3
|
* tame "stdio rpath wpath". rpath is for localtime() and mktime(),deraadt2015-10-071-1/+4
| | | | | | | while wpath is for logwtmp(), a bit pessimistically since it is not clear what could happen. This is done AFTER the time is potentially set, since settimeofday() is not available to us. Improvements and tests would be welcome.
* drop useless .No, .Ns, and quotingschwarze2015-09-251-3/+4
|
* FALLTHROUGH in getopt is incorrect. While here use strtonumderaadt2015-04-171-7/+6
| | | | | to parse tz_minuteswest. ok millert
* Eliminate use of TM_YEAR_BASE. OK guenther@ deraadt@ miod@millert2015-03-171-2/+2
|
* tzfile.h is an internal header that should never have been installed.millert2015-03-151-2/+1
| | | | | | | | | What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@
* When getopt processing flags, many should be flag=1 instead of flag++deraadt2015-02-071-2/+2
| | | | ok tedu miod
* remove .Tn; from Jan Stary <hans at stare dot cz>schwarze2015-01-151-4/+3
|
* reference xsi, not xpg;jmc2014-02-141-3/+4
| | | | ok millert schwarze sobrado (or standards@ as i'm tempted to call them ;)
* localtime(3) can return NULL; seen by Rod Whitworth; ok guenther@otto2014-01-211-2/+6
|
* comma previous;jmc2014-01-051-3/+3
|
* garbage collect unused global variable retval,schwarze2014-01-051-3/+3
| | | | | forgotten in rev. 1.36 when removing timed(8) support; proofed by sobrado@
* some conversion specifiers are not required by POSIX;schwarze2014-01-051-1/+12
| | | | joint work and OK jmc@ sobrado@
* date(1) can only exit(0) or exit(1), not exit(2), so make this .Ex -std;schwarze2014-01-051-6/+3
| | | | | obviouly, this was forgotten in rev. 1.57 when removing timed(8) support. ok jmc@ sobrado@
* note that our date supports traditional bsd date format, which isjmc2014-01-031-2/+10
| | | | | | | | | different to what posix/xpg specifies; diff originally posted to tech, changed after some feedback from kettenis, then a bit more from schwarze and sobrado; ok schwarze sobrado
* remove erroneous char cast to switch expression processing getopt(3);okan2013-11-271-2/+2
| | | | | | not used in any cases. ok deraadt@, guenther@, millert@
* add unsigned char casts for specific calls to ctype.h macros.deraadt2013-11-211-3/+3
| | | | ok guenther step
* Parse the argument the -r option with atoll() to support dates past 2038guenther2013-10-201-2/+2
| | | | from J Drivdal (xjd (at) rivu.net)
* replace sys/param.h with sys/types.h (and sometimes add limits.h if needed)deraadt2012-12-041-2/+2
| | | | ok guenther
* use the same format/text, as far as possible, for date strings;jmc2011-08-311-11/+19
| | | | help/ok guenther millert
* extern.h no longer neededderaadt2011-07-082-38/+1
|
* remove a closing (unmatched) Re, missed in previous;jmc2011-07-081-3/+2
|
* timed's time is up. use ntpd(8). Even our own fossil developersderaadt2011-07-074-254/+28
| | | | | switched a while back. ok miod, kettenis
* add -z to the extensions list in STANDARDS;jmc2011-03-111-2/+2
|
* Add a non-standard option that affects the output TZ only. The input (forderaadt2011-03-112-8/+23
| | | | | | parsing) TZ is unaffected. This makes it it easier to convert timestamps from any timezone to any other timezone -- no need for $() gymnastics ok millert
* Check that date(1) is not passed any extra arguments.deraadt2011-03-111-4/+11
| | | | ok millert
* more wacky macro fixing;jmc2010-09-191-3/+4
|
* add an EXIT STATUS section for /bin;jmc2010-09-031-7/+7
|
* move exit returns blurb out of DIAGNOSTICS; from daniel dickmanjmc2010-07-221-5/+7
|
* tweak previous; ok deraadtjmc2010-04-011-4/+4
|
* Make a -DSMALL version of date(1) for the mediaderaadt2010-03-312-3/+17
|
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-272-24/+2
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a fewjmc2009-02-081-3/+3
| | | | updates to follow;
* give a less confusing error message on bindresvport() failure; okotto2008-10-011-3/+3
| | | | matthieu@ millert@
* printf field widths are always int, so add a cast to removechl2007-12-281-3/+3
| | | | | | "warning: field width is not type int" "looks good" otto@
* sync the synopsis and usage of commandssobrado2007-10-161-3/+3
| | | | ok jmc@
* convert to new .Dd format;jmc2007-05-311-2/+2
|
* - consistent STANDARDS blurbjmc2007-05-291-3/+8
| | | | | | - note which options are extensions to POSIX discussed w/ deraadt otto millert
* Remove y2k hack. If no century is specified, use the current one.millert2007-05-251-14/+8
| | | | OK otto@